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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 6975037: Revert 85666 - Consolidate ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view.cc (revision 85701)
+++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
@@ -1554,10 +1554,7 @@
bool BrowserView::ExecuteWindowsCommand(int command_id) {
// This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND.
-#if defined(OS_WIN)
- if (command_id == IDC_DEBUG_FRAME_TOGGLE)
- GetWindow()->DebugToggleFrameType();
-#endif
+
// Translate WM_APPCOMMAND command ids into a command id that the browser
// knows how to handle.
int command_id_from_app_command = GetCommandIDForAppCommandID(command_id);
@@ -1804,7 +1801,7 @@
SkColor BrowserView::GetInfoBarSeparatorColor() const {
// NOTE: Keep this in sync with ToolbarView::OnPaint()!
- return (IsTabStripVisible() || !frame_->ShouldUseNativeFrame()) ?
+ return (IsTabStripVisible() || !frame_->non_client_view()->UseNativeFrame()) ?
ResourceBundle::toolbar_separator_color : SK_ColorBLACK;
}
@@ -2359,7 +2356,6 @@
system_menu_contents_->AddSeparator();
system_menu_contents_->AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB);
system_menu_contents_->AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
- AddFrameToggleItems();
// If it's a regular browser window with tabs, we don't add any more items,
// since it already has menus (Page, Chrome).
}
@@ -2400,17 +2396,7 @@
IDS_CONTENT_CONTEXT_FORWARD);
system_menu_contents_->AddItemWithStringId(IDC_BACK,
IDS_CONTENT_CONTEXT_BACK);
- AddFrameToggleItems();
}
-
-void BrowserView::AddFrameToggleItems() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDebugEnableFrameToggle)) {
- system_menu_contents_->AddSeparator();
- system_menu_contents_->AddItem(IDC_DEBUG_FRAME_TOGGLE,
- L"Toggle Frame Type");
- }
-}
#endif
int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698