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

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

Issue 11191028: Revert 162382 - ash: Add test for maximized app window frame switching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 class AppNonClientFrameViewAura : public BrowserNonClientFrameView { 16 class AppNonClientFrameViewAura : public BrowserNonClientFrameView {
17 public: 17 public:
18 static const char kViewClassName[]; // visible for test
19 static const char kControlWindowName[]; // visible for test 18 static const char kControlWindowName[]; // visible for test
20 19
21 AppNonClientFrameViewAura( 20 AppNonClientFrameViewAura(
22 BrowserFrame* frame, BrowserView* browser_view); 21 BrowserFrame* frame, BrowserView* browser_view);
23 virtual ~AppNonClientFrameViewAura(); 22 virtual ~AppNonClientFrameViewAura();
24 23
25 // NonClientFrameView: 24 // NonClientFrameView:
26 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 25 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
27 virtual gfx::Rect GetWindowBoundsForClientBounds( 26 virtual gfx::Rect GetWindowBoundsForClientBounds(
28 const gfx::Rect& client_bounds) const OVERRIDE; 27 const gfx::Rect& client_bounds) const OVERRIDE;
29 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 28 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
30 virtual void GetWindowMask( 29 virtual void GetWindowMask(
31 const gfx::Size& size, 30 const gfx::Size& size,
32 gfx::Path* window_mask) OVERRIDE; 31 gfx::Path* window_mask) OVERRIDE;
33 virtual void ResetWindowControls() OVERRIDE; 32 virtual void ResetWindowControls() OVERRIDE;
34 virtual void UpdateWindowIcon() OVERRIDE; 33 virtual void UpdateWindowIcon() OVERRIDE;
35 virtual void UpdateWindowTitle() OVERRIDE; 34 virtual void UpdateWindowTitle() OVERRIDE;
36 35
37 // BrowserNonClientFrameView: 36 // BrowserNonClientFrameView:
38 virtual gfx::Rect GetBoundsForTabStrip( 37 virtual gfx::Rect GetBoundsForTabStrip(
39 views::View* tabstrip) const OVERRIDE; 38 views::View* tabstrip) const OVERRIDE;
40 virtual TabStripInsets GetTabStripInsets(bool restored) const OVERRIDE; 39 virtual TabStripInsets GetTabStripInsets(bool restored) const OVERRIDE;
41 virtual int GetThemeBackgroundXInset() const OVERRIDE; 40 virtual int GetThemeBackgroundXInset() const OVERRIDE;
42 virtual void UpdateThrobber(bool running) OVERRIDE; 41 virtual void UpdateThrobber(bool running) OVERRIDE;
43 42
44 // View: 43 // View:
45 virtual std::string GetClassName() const OVERRIDE;
46 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 44 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
47 45
48 private: 46 private:
49 class ControlView; 47 class ControlView;
50 class FrameObserver; 48 class FrameObserver;
51 49
52 gfx::Rect GetControlBounds() const; 50 gfx::Rect GetControlBounds() const;
53 51
54 // Closes |control_widget_|. 52 // Closes |control_widget_|.
55 void CloseControlWidget(); 53 void CloseControlWidget();
56 54
57 // The View containing the restore and close buttons. 55 // The View containing the restore and close buttons.
58 ControlView* control_view_; 56 ControlView* control_view_;
59 // The widget holding the control_view_. 57 // The widget holding the control_view_.
60 views::Widget* control_widget_; 58 views::Widget* control_widget_;
61 // Observer for browser frame close. 59 // Observer for browser frame close.
62 scoped_ptr<FrameObserver> frame_observer_; 60 scoped_ptr<FrameObserver> frame_observer_;
63 61
64 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura); 62 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura);
65 }; 63 };
66 64
67 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ 65 #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