blob: ce1c5ed4c1faf6485ca3ef5a91b0e036e0ef66e2 [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_
#define UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_
#include "base/macros.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/window/non_client_view.h"
namespace views {
class Widget;
class VIEWS_EXPORT NativeFrameView : public NonClientFrameView {
public:
METADATA_HEADER(NativeFrameView);
explicit NativeFrameView(Widget* frame);
NativeFrameView(const NativeFrameView&) = delete;
NativeFrameView& operator=(const NativeFrameView&) = delete;
~NativeFrameView() override;
// NonClientFrameView overrides:
gfx::Rect GetBoundsForClientView() const override;
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;
int NonClientHitTest(const gfx::Point& point) override;
void GetWindowMask(const gfx::Size& size, SkPath* window_mask) override;
void ResetWindowControls() override;
void UpdateWindowIcon() override;
void UpdateWindowTitle() override;
void SizeConstraintsChanged() override;
// View overrides:
gfx::Size CalculatePreferredSize() const override;
gfx::Size GetMinimumSize() const override;
gfx::Size GetMaximumSize() const override;
private:
// Our containing frame.
Widget* frame_;
};
BEGIN_VIEW_BUILDER(VIEWS_EXPORT, NativeFrameView, NonClientFrameView)
END_VIEW_BUILDER
} // namespace views
DEFINE_VIEW_BUILDER(VIEWS_EXPORT, NativeFrameView)
#endif // UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_