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

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

Issue 10638016: Merge 143447 - On Windows 8 when a metro application is snapped running desktop application windows… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 6 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/browser_frame_win.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_BROWSER_FRAME_WIN_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 UINT position, 53 UINT position,
54 BOOL is_system_menu) OVERRIDE; 54 BOOL is_system_menu) OVERRIDE;
55 virtual void OnWindowPosChanged(WINDOWPOS* window_pos) OVERRIDE; 55 virtual void OnWindowPosChanged(WINDOWPOS* window_pos) OVERRIDE;
56 virtual void OnScreenReaderDetected() OVERRIDE; 56 virtual void OnScreenReaderDetected() OVERRIDE;
57 virtual bool ShouldUseNativeFrame() const OVERRIDE; 57 virtual bool ShouldUseNativeFrame() const OVERRIDE;
58 virtual void Show() OVERRIDE; 58 virtual void Show() OVERRIDE;
59 virtual void ShowMaximizedWithBounds( 59 virtual void ShowMaximizedWithBounds(
60 const gfx::Rect& restored_bounds) OVERRIDE; 60 const gfx::Rect& restored_bounds) OVERRIDE;
61 virtual void ShowWithWindowState(ui::WindowShowState show_state) OVERRIDE; 61 virtual void ShowWithWindowState(ui::WindowShowState show_state) OVERRIDE;
62 virtual void Close() OVERRIDE; 62 virtual void Close() OVERRIDE;
63 virtual void OnActivate(UINT action, BOOL minimized, HWND window) OVERRIDE;
63 64
64 // Overridden from NativeBrowserFrame: 65 // Overridden from NativeBrowserFrame:
65 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; 66 virtual views::NativeWidget* AsNativeWidget() OVERRIDE;
66 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; 67 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE;
67 virtual void InitSystemContextMenu() OVERRIDE; 68 virtual void InitSystemContextMenu() OVERRIDE;
68 virtual int GetMinimizeButtonOffset() const OVERRIDE; 69 virtual int GetMinimizeButtonOffset() const OVERRIDE;
69 virtual void TabStripDisplayModeChanged() OVERRIDE; 70 virtual void TabStripDisplayModeChanged() OVERRIDE;
70 71
71 // Overriden from views::ImageButton override: 72 // Overriden from views::ImageButton override:
72 virtual void ButtonPressed(views::Button* sender, 73 virtual void ButtonPressed(views::Button* sender,
(...skipping 21 matching lines...) Expand all
94 // Returns information about the currently displayed tab in metro mode. 95 // Returns information about the currently displayed tab in metro mode.
95 void GetMetroCurrentTabInfo(WPARAM w_param); 96 void GetMetroCurrentTabInfo(WPARAM w_param);
96 97
97 // Ensures that the window frame follows the Windows 8 metro app guidelines, 98 // Ensures that the window frame follows the Windows 8 metro app guidelines,
98 // i.e. no system menu, etc. 99 // i.e. no system menu, etc.
99 void AdjustFrameForImmersiveMode(); 100 void AdjustFrameForImmersiveMode();
100 101
101 // Called when the frame is closed. Only applies to Windows 8 metro mode. 102 // Called when the frame is closed. Only applies to Windows 8 metro mode.
102 void CloseImmersiveFrame(); 103 void CloseImmersiveFrame();
103 104
105 // Calculates and caches the minimize button delta, i.e. the offset to be
106 // applied to the left/right coordinates of the client rectangle in case
107 // we fail to retrieve the offset of the minimize button.
108 void CacheMinimizeButtonDelta();
109
104 // The BrowserView is our ClientView. This is a pointer to it. 110 // The BrowserView is our ClientView. This is a pointer to it.
105 BrowserView* browser_view_; 111 BrowserView* browser_view_;
106 112
107 BrowserFrame* browser_frame_; 113 BrowserFrame* browser_frame_;
108 114
109 // The additional items we insert into the system menu. 115 // The additional items we insert into the system menu.
110 scoped_ptr<SystemMenuModelDelegate> system_menu_delegate_; 116 scoped_ptr<SystemMenuModelDelegate> system_menu_delegate_;
111 scoped_ptr<SystemMenuModel> system_menu_contents_; 117 scoped_ptr<SystemMenuModel> system_menu_contents_;
112 scoped_ptr<ZoomMenuModel> zoom_menu_contents_; 118 scoped_ptr<ZoomMenuModel> zoom_menu_contents_;
113 scoped_ptr<EncodingMenuModel> encoding_menu_contents_; 119 scoped_ptr<EncodingMenuModel> encoding_menu_contents_;
114 // The wrapped system menu itself. 120 // The wrapped system menu itself.
115 scoped_ptr<views::NativeMenuWin> system_menu_; 121 scoped_ptr<views::NativeMenuWin> system_menu_;
116 122
123 // See CacheMinimizeButtonDelta() for details about this member.
124 int cached_minimize_button_x_delta_;
125
117 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); 126 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin);
118 }; 127 };
119 128
120 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ 129 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698