Chromium Code Reviews

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

Issue 796433003: MacViews: Don't draw custom frame on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keybinding3
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame.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_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_member.h"
11 #include "build/build_config.h" 10 #include "build/build_config.h"
12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
13 #include "ui/views/context_menu_controller.h" 12 #include "ui/views/context_menu_controller.h"
14 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
15 14
16 class AvatarMenuButton; 15 class AvatarMenuButton;
17 class BrowserRootView; 16 class BrowserRootView;
18 class BrowserView; 17 class BrowserView;
19 class NativeBrowserFrame; 18 class NativeBrowserFrame;
20 class NewAvatarButton; 19 class NewAvatarButton;
(...skipping 95 matching lines...)
116 115
117 AvatarMenuButton* GetAvatarMenuButton(); 116 AvatarMenuButton* GetAvatarMenuButton();
118 117
119 NewAvatarButton* GetNewAvatarMenuButton(); 118 NewAvatarButton* GetNewAvatarMenuButton();
120 119
121 // Returns the menu model. BrowserFrame owns the returned model. 120 // Returns the menu model. BrowserFrame owns the returned model.
122 // Note that in multi user mode this will upon each call create a new model. 121 // Note that in multi user mode this will upon each call create a new model.
123 ui::MenuModel* GetSystemMenuModel(); 122 ui::MenuModel* GetSystemMenuModel();
124 123
125 private: 124 private:
126 // Called when the preference changes.
127 void OnUseCustomChromeFrameChanged();
128
129 NativeBrowserFrame* native_browser_frame_; 125 NativeBrowserFrame* native_browser_frame_;
130 126
131 // A weak reference to the root view associated with the window. We save a 127 // A weak reference to the root view associated with the window. We save a
132 // copy as a BrowserRootView to avoid evil casting later, when we need to call 128 // copy as a BrowserRootView to avoid evil casting later, when we need to call
133 // functions that only exist on BrowserRootView (versus RootView). 129 // functions that only exist on BrowserRootView (versus RootView).
134 BrowserRootView* root_view_; 130 BrowserRootView* root_view_;
135 131
136 // A pointer to our NonClientFrameView as a BrowserNonClientFrameView. 132 // A pointer to our NonClientFrameView as a BrowserNonClientFrameView.
137 BrowserNonClientFrameView* browser_frame_view_; 133 BrowserNonClientFrameView* browser_frame_view_;
138 134
139 // The BrowserView is our ClientView. This is a pointer to it. 135 // The BrowserView is our ClientView. This is a pointer to it.
140 BrowserView* browser_view_; 136 BrowserView* browser_view_;
141 137
142 scoped_ptr<SystemMenuModelBuilder> menu_model_builder_; 138 scoped_ptr<SystemMenuModelBuilder> menu_model_builder_;
143 139
144 // Used to show the system menu. Only used if 140 // Used to show the system menu. Only used if
145 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. 141 // NativeBrowserFrame::UsesNativeSystemMenu() returns false.
146 scoped_ptr<views::MenuRunner> menu_runner_; 142 scoped_ptr<views::MenuRunner> menu_runner_;
147 143
148 // SetThemeProvider() triggers setting both |owned_theme_provider_| and 144 // SetThemeProvider() triggers setting both |owned_theme_provider_| and
149 // |theme_provider_|. Initially |theme_provider_| is set to the ThemeService 145 // |theme_provider_|. Initially |theme_provider_| is set to the ThemeService
150 // and |owned_theme_provider_| is null (as ThemeServices lifetime is managed 146 // and |owned_theme_provider_| is null (as ThemeServices lifetime is managed
151 // externally). 147 // externally).
152 scoped_ptr<ui::ThemeProvider> owned_theme_provider_; 148 scoped_ptr<ui::ThemeProvider> owned_theme_provider_;
153 ui::ThemeProvider* theme_provider_; 149 ui::ThemeProvider* theme_provider_;
154 150
155 // Whether the custom Chrome frame preference is set.
156 BooleanPrefMember use_custom_frame_pref_;
157
158 scoped_ptr<ui::EventHandler> browser_command_handler_; 151 scoped_ptr<ui::EventHandler> browser_command_handler_;
159 152
160 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); 153 DISALLOW_COPY_AND_ASSIGN(BrowserFrame);
161 }; 154 };
162 155
163 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ 156 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine