OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_ASH_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_ASH_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
13 } | 13 } |
14 | 14 |
15 // NonClientFrameViewAura implementation for apps. | 15 // NonClientFrameViewAsh implementation for maximized apps. |
16 // TODO(jamescook): Rename this to AppNonClientFrameViewAsh. It is only used | 16 class AppNonClientFrameViewAsh : public BrowserNonClientFrameView { |
17 // with the Aura shell (Ash). crbug.com/156361 | |
18 class AppNonClientFrameViewAura : public BrowserNonClientFrameView { | |
19 public: | 17 public: |
20 static const char kViewClassName[]; // visible for test | 18 static const char kViewClassName[]; // visible for test |
21 static const char kControlWindowName[]; // visible for test | 19 static const char kControlWindowName[]; // visible for test |
22 | 20 |
23 AppNonClientFrameViewAura( | 21 AppNonClientFrameViewAsh( |
24 BrowserFrame* frame, BrowserView* browser_view); | 22 BrowserFrame* frame, BrowserView* browser_view); |
25 virtual ~AppNonClientFrameViewAura(); | 23 virtual ~AppNonClientFrameViewAsh(); |
26 | 24 |
27 // NonClientFrameView: | 25 // NonClientFrameView: |
28 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 26 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
29 virtual gfx::Rect GetWindowBoundsForClientBounds( | 27 virtual gfx::Rect GetWindowBoundsForClientBounds( |
30 const gfx::Rect& client_bounds) const OVERRIDE; | 28 const gfx::Rect& client_bounds) const OVERRIDE; |
31 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 29 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
32 virtual void GetWindowMask( | 30 virtual void GetWindowMask( |
33 const gfx::Size& size, | 31 const gfx::Size& size, |
34 gfx::Path* window_mask) OVERRIDE; | 32 gfx::Path* window_mask) OVERRIDE; |
35 virtual void ResetWindowControls() OVERRIDE; | 33 virtual void ResetWindowControls() OVERRIDE; |
(...skipping 20 matching lines...) Expand all Loading... |
56 // Closes |control_widget_|. | 54 // Closes |control_widget_|. |
57 void CloseControlWidget(); | 55 void CloseControlWidget(); |
58 | 56 |
59 // The View containing the restore and close buttons. | 57 // The View containing the restore and close buttons. |
60 ControlView* control_view_; | 58 ControlView* control_view_; |
61 // The widget holding the control_view_. | 59 // The widget holding the control_view_. |
62 views::Widget* control_widget_; | 60 views::Widget* control_widget_; |
63 // Observer for browser frame close. | 61 // Observer for browser frame close. |
64 scoped_ptr<FrameObserver> frame_observer_; | 62 scoped_ptr<FrameObserver> frame_observer_; |
65 | 63 |
66 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura); | 64 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAsh); |
67 }; | 65 }; |
68 | 66 |
69 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_ASH_H_ |
OLD | NEW |