Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h

Issue 11192004: Reland - ash: Add test for maximized app window frame switching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows expect_eq Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_AURA_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_AURA_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 // NonClientFrameViewAura implementation for apps.
16 // TODO(jamescook): Rename this to AppNonClientFrameViewAsh. It is only used
17 // with the Aura shell (Ash). crbug.com/156361
16 class AppNonClientFrameViewAura : public BrowserNonClientFrameView { 18 class AppNonClientFrameViewAura : public BrowserNonClientFrameView {
17 public: 19 public:
20 static const char kViewClassName[]; // visible for test
18 static const char kControlWindowName[]; // visible for test 21 static const char kControlWindowName[]; // visible for test
19 22
20 AppNonClientFrameViewAura( 23 AppNonClientFrameViewAura(
21 BrowserFrame* frame, BrowserView* browser_view); 24 BrowserFrame* frame, BrowserView* browser_view);
22 virtual ~AppNonClientFrameViewAura(); 25 virtual ~AppNonClientFrameViewAura();
23 26
24 // NonClientFrameView: 27 // NonClientFrameView:
25 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 28 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
26 virtual gfx::Rect GetWindowBoundsForClientBounds( 29 virtual gfx::Rect GetWindowBoundsForClientBounds(
27 const gfx::Rect& client_bounds) const OVERRIDE; 30 const gfx::Rect& client_bounds) const OVERRIDE;
28 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 31 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
29 virtual void GetWindowMask( 32 virtual void GetWindowMask(
30 const gfx::Size& size, 33 const gfx::Size& size,
31 gfx::Path* window_mask) OVERRIDE; 34 gfx::Path* window_mask) OVERRIDE;
32 virtual void ResetWindowControls() OVERRIDE; 35 virtual void ResetWindowControls() OVERRIDE;
33 virtual void UpdateWindowIcon() OVERRIDE; 36 virtual void UpdateWindowIcon() OVERRIDE;
34 virtual void UpdateWindowTitle() OVERRIDE; 37 virtual void UpdateWindowTitle() OVERRIDE;
35 38
36 // BrowserNonClientFrameView: 39 // BrowserNonClientFrameView:
37 virtual gfx::Rect GetBoundsForTabStrip( 40 virtual gfx::Rect GetBoundsForTabStrip(
38 views::View* tabstrip) const OVERRIDE; 41 views::View* tabstrip) const OVERRIDE;
39 virtual TabStripInsets GetTabStripInsets(bool restored) const OVERRIDE; 42 virtual TabStripInsets GetTabStripInsets(bool restored) const OVERRIDE;
40 virtual int GetThemeBackgroundXInset() const OVERRIDE; 43 virtual int GetThemeBackgroundXInset() const OVERRIDE;
41 virtual void UpdateThrobber(bool running) OVERRIDE; 44 virtual void UpdateThrobber(bool running) OVERRIDE;
42 45
43 // View: 46 // View:
47 virtual std::string GetClassName() const OVERRIDE;
44 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 48 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
45 49
46 private: 50 private:
47 class ControlView; 51 class ControlView;
48 class FrameObserver; 52 class FrameObserver;
49 53
50 gfx::Rect GetControlBounds() const; 54 gfx::Rect GetControlBounds() const;
51 55
52 // Closes |control_widget_|. 56 // Closes |control_widget_|.
53 void CloseControlWidget(); 57 void CloseControlWidget();
54 58
55 // The View containing the restore and close buttons. 59 // The View containing the restore and close buttons.
56 ControlView* control_view_; 60 ControlView* control_view_;
57 // The widget holding the control_view_. 61 // The widget holding the control_view_.
58 views::Widget* control_widget_; 62 views::Widget* control_widget_;
59 // Observer for browser frame close. 63 // Observer for browser frame close.
60 scoped_ptr<FrameObserver> frame_observer_; 64 scoped_ptr<FrameObserver> frame_observer_;
61 65
62 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura); 66 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura);
63 }; 67 };
64 68
65 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ 69 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698