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

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

Issue 111723012: Linux Aura: Added --use-system-title-bar flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting. Created 7 years 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
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 #include "chrome/browser/ui/views/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "chrome/browser/app_mode/app_mode_utils.h" 10 #include "chrome/browser/app_mode/app_mode_utils.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // you're running a binary that doesn't have a matching .desktop 121 // you're running a binary that doesn't have a matching .desktop
122 // file. 122 // file.
123 const std::string user_data_dir = 123 const std::string user_data_dir =
124 command_line.GetSwitchValueNative(switches::kUserDataDir); 124 command_line.GetSwitchValueNative(switches::kUserDataDir);
125 params.wm_class_name += " (" + user_data_dir + ")"; 125 params.wm_class_name += " (" + user_data_dir + ")";
126 } 126 }
127 const char kX11WindowRoleBrowser[] = "browser"; 127 const char kX11WindowRoleBrowser[] = "browser";
128 const char kX11WindowRolePopup[] = "pop-up"; 128 const char kX11WindowRolePopup[] = "pop-up";
129 params.wm_role_name = browser_view_->browser()->is_type_tabbed() ? 129 params.wm_role_name = browser_view_->browser()->is_type_tabbed() ?
130 std::string(kX11WindowRoleBrowser) : std::string(kX11WindowRolePopup); 130 std::string(kX11WindowRoleBrowser) : std::string(kX11WindowRolePopup);
131
132 params.remove_standard_frame =
133 !command_line.HasSwitch(switches::kUseSystemTitleBar);
131 #endif // defined(OS_LINUX) 134 #endif // defined(OS_LINUX)
132 135
133 Init(params); 136 Init(params);
134 137
135 if (!native_browser_frame_->UsesNativeSystemMenu()) { 138 if (!native_browser_frame_->UsesNativeSystemMenu()) {
136 DCHECK(non_client_view()); 139 DCHECK(non_client_view());
137 non_client_view()->set_context_menu_controller(this); 140 non_client_view()->set_context_menu_controller(this);
138 } 141 }
139 } 142 }
140 143
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 270
268 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() { 271 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() {
269 return browser_frame_view_->new_avatar_button(); 272 return browser_frame_view_->new_avatar_button();
270 } 273 }
271 274
272 #if !defined(OS_WIN) || defined(USE_AURA) 275 #if !defined(OS_WIN) || defined(USE_AURA)
273 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { 276 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() {
274 return !IsMaximized(); 277 return !IsMaximized();
275 } 278 }
276 #endif // OS_WIN 279 #endif // OS_WIN
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698