OLD | NEW |
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 Loading... |
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); | |
134 #endif // defined(OS_LINUX) | 131 #endif // defined(OS_LINUX) |
135 | 132 |
136 Init(params); | 133 Init(params); |
137 | 134 |
138 if (!native_browser_frame_->UsesNativeSystemMenu()) { | 135 if (!native_browser_frame_->UsesNativeSystemMenu()) { |
139 DCHECK(non_client_view()); | 136 DCHECK(non_client_view()); |
140 non_client_view()->set_context_menu_controller(this); | 137 non_client_view()->set_context_menu_controller(this); |
141 } | 138 } |
142 } | 139 } |
143 | 140 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 267 |
271 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() { | 268 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() { |
272 return browser_frame_view_->new_avatar_button(); | 269 return browser_frame_view_->new_avatar_button(); |
273 } | 270 } |
274 | 271 |
275 #if !defined(OS_WIN) || defined(USE_AURA) | 272 #if !defined(OS_WIN) || defined(USE_AURA) |
276 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { | 273 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { |
277 return !IsMaximized(); | 274 return !IsMaximized(); |
278 } | 275 } |
279 #endif // OS_WIN | 276 #endif // OS_WIN |
OLD | NEW |