OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ | 5 #ifndef ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
6 #define ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ | 6 #define ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
7 | 7 |
8 #include "athena/wm/public/window_manager_observer.h" | 8 #include "athena/wm/public/window_manager_observer.h" |
9 #include "ui/gfx/insets.h" | 9 #include "ui/gfx/insets.h" |
10 #include "ui/views/window/non_client_view.h" | 10 #include "ui/views/window/non_client_view.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ActivityFrameView : public views::NonClientFrameView, | 23 class ActivityFrameView : public views::NonClientFrameView, |
24 public WindowManagerObserver { | 24 public WindowManagerObserver { |
25 public: | 25 public: |
26 // The frame class name. | 26 // The frame class name. |
27 static const char kViewClassName[]; | 27 static const char kViewClassName[]; |
28 | 28 |
29 ActivityFrameView(views::Widget* frame, ActivityViewModel* view_model); | 29 ActivityFrameView(views::Widget* frame, ActivityViewModel* view_model); |
30 virtual ~ActivityFrameView(); | 30 virtual ~ActivityFrameView(); |
31 | 31 |
32 // views::NonClientFrameView: | 32 // views::NonClientFrameView: |
33 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 33 virtual gfx::Rect GetBoundsForClientView() const override; |
34 virtual gfx::Rect GetWindowBoundsForClientBounds( | 34 virtual gfx::Rect GetWindowBoundsForClientBounds( |
35 const gfx::Rect& client_bounds) const OVERRIDE; | 35 const gfx::Rect& client_bounds) const override; |
36 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 36 virtual int NonClientHitTest(const gfx::Point& point) override; |
37 virtual void GetWindowMask(const gfx::Size& size, | 37 virtual void GetWindowMask(const gfx::Size& size, |
38 gfx::Path* window_mask) OVERRIDE; | 38 gfx::Path* window_mask) override; |
39 virtual void ResetWindowControls() OVERRIDE; | 39 virtual void ResetWindowControls() override; |
40 virtual void UpdateWindowIcon() OVERRIDE; | 40 virtual void UpdateWindowIcon() override; |
41 virtual void UpdateWindowTitle() OVERRIDE; | 41 virtual void UpdateWindowTitle() override; |
42 virtual void SizeConstraintsChanged() OVERRIDE; | 42 virtual void SizeConstraintsChanged() override; |
43 | 43 |
44 // views::View: | 44 // views::View: |
45 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 45 virtual gfx::Size GetPreferredSize() const override; |
46 virtual const char* GetClassName() const OVERRIDE; | 46 virtual const char* GetClassName() const override; |
47 virtual void Layout() OVERRIDE; | 47 virtual void Layout() override; |
48 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 48 virtual void OnPaintBackground(gfx::Canvas* canvas) override; |
49 | 49 |
50 private: | 50 private: |
51 // WindowManagerObserver: | 51 // WindowManagerObserver: |
52 virtual void OnOverviewModeEnter() OVERRIDE; | 52 virtual void OnOverviewModeEnter() override; |
53 virtual void OnOverviewModeExit() OVERRIDE; | 53 virtual void OnOverviewModeExit() override; |
54 virtual void OnSplitViewModeEnter() OVERRIDE; | 54 virtual void OnSplitViewModeEnter() override; |
55 virtual void OnSplitViewModeExit() OVERRIDE; | 55 virtual void OnSplitViewModeExit() override; |
56 | 56 |
57 gfx::Insets NonClientBorderInsets() const; | 57 gfx::Insets NonClientBorderInsets() const; |
58 int NonClientBorderThickness() const; | 58 int NonClientBorderThickness() const; |
59 int NonClientTopBorderHeight() const; | 59 int NonClientTopBorderHeight() const; |
60 | 60 |
61 // Not owned. | 61 // Not owned. |
62 views::Widget* frame_; | 62 views::Widget* frame_; |
63 ActivityViewModel* view_model_; | 63 ActivityViewModel* view_model_; |
64 views::Label* title_; | 64 views::Label* title_; |
65 views::ImageView* icon_; | 65 views::ImageView* icon_; |
66 | 66 |
67 // Whether overview mode is active. | 67 // Whether overview mode is active. |
68 bool in_overview_; | 68 bool in_overview_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(ActivityFrameView); | 70 DISALLOW_COPY_AND_ASSIGN(ActivityFrameView); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace athena | 73 } // namespace athena |
74 | 74 |
75 #endif // ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ | 75 #endif // ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
OLD | NEW |