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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "chrome/browser/app_mode/app_mode_utils.h" | 13 #include "chrome/browser/app_mode/app_mode_utils.h" |
14 #include "chrome/browser/themes/theme_service.h" | 14 #include "chrome/browser/themes/theme_service.h" |
15 #include "chrome/browser/themes/theme_service_factory.h" | 15 #include "chrome/browser/themes/theme_service_factory.h" |
16 #include "chrome/browser/ui/ash/metrics/stylus_metrics_recorder.h" | |
xiyuan
2016/09/16 20:07:54
ditto. Need to decide whether this is chormeos-onl
xiaoyinh(OOO Sep 11-29)
2016/09/16 22:34:25
Wrapped under OS_CHROMEOS
| |
16 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
18 #include "chrome/browser/ui/browser_window_state.h" | 19 #include "chrome/browser/ui/browser_window_state.h" |
19 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 20 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
20 #include "chrome/browser/ui/views/frame/browser_root_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_root_view.h" |
21 #include "chrome/browser/ui/views/frame/browser_view.h" | 22 #include "chrome/browser/ui/views/frame/browser_view.h" |
22 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 23 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
23 #include "chrome/browser/ui/views/frame/native_browser_frame.h" | 24 #include "chrome/browser/ui/views/frame/native_browser_frame.h" |
24 #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" | 25 #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" |
25 #include "chrome/browser/ui/views/frame/system_menu_model_builder.h" | 26 #include "chrome/browser/ui/views/frame/system_menu_model_builder.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 const base::CommandLine& parsed_command_line = | 92 const base::CommandLine& parsed_command_line = |
92 *base::CommandLine::ForCurrentProcess(); | 93 *base::CommandLine::ForCurrentProcess(); |
93 | 94 |
94 if (parsed_command_line.HasSwitch(switches::kWindowWorkspace)) { | 95 if (parsed_command_line.HasSwitch(switches::kWindowWorkspace)) { |
95 params.workspace = | 96 params.workspace = |
96 parsed_command_line.GetSwitchValueASCII(switches::kWindowWorkspace); | 97 parsed_command_line.GetSwitchValueASCII(switches::kWindowWorkspace); |
97 } | 98 } |
98 } | 99 } |
99 | 100 |
100 Init(params); | 101 Init(params); |
102 browser_view_->GetNativeWindow()->SetProperty( | |
103 chromeos::kStylusWindowTypeBucket, | |
104 chromeos::StylusWindowType::WINDOW_TYPE_BROWSER_WINDOW); | |
101 | 105 |
102 if (!native_browser_frame_->UsesNativeSystemMenu()) { | 106 if (!native_browser_frame_->UsesNativeSystemMenu()) { |
103 DCHECK(non_client_view()); | 107 DCHECK(non_client_view()); |
104 non_client_view()->set_context_menu_controller(this); | 108 non_client_view()->set_context_menu_controller(this); |
105 } | 109 } |
106 | 110 |
107 #if defined(OS_LINUX) | 111 #if defined(OS_LINUX) |
108 browser_command_handler_.reset(new BrowserCommandHandlerLinux(browser_view_)); | 112 browser_command_handler_.reset(new BrowserCommandHandlerLinux(browser_view_)); |
109 #endif | 113 #endif |
110 } | 114 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
294 } | 298 } |
295 | 299 |
296 views::View* BrowserFrame::GetNewAvatarMenuButton() { | 300 views::View* BrowserFrame::GetNewAvatarMenuButton() { |
297 return browser_frame_view_->GetProfileSwitcherView(); | 301 return browser_frame_view_->GetProfileSwitcherView(); |
298 } | 302 } |
299 | 303 |
300 void BrowserFrame::OnMenuClosed() { | 304 void BrowserFrame::OnMenuClosed() { |
301 menu_model_adapter_.reset(); | 305 menu_model_adapter_.reset(); |
302 menu_runner_.reset(); | 306 menu_runner_.reset(); |
303 } | 307 } |
OLD | NEW |