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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 1843563003: Move arc_intent_helper_bridge.h from c/b/chromeos/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a comment Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/chrome_browser_chromeos.gypi » ('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 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/content/gpu_support_impl.h" 9 #include "ash/content/gpu_support_impl.h"
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
11 #include "ash/wm/window_state.h" 11 #include "ash/wm/window_state.h"
12 #include "ash/wm/window_util.h" 12 #include "ash/wm/window_util.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/app_mode/app_mode_utils.h" 14 #include "chrome/browser/app_mode/app_mode_utils.h"
15 #include "chrome/browser/lifetime/application_lifetime.h" 15 #include "chrome/browser/lifetime/application_lifetime.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/profiles/profiles_state.h" 17 #include "chrome/browser/profiles/profiles_state.h"
18 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 18 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
19 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" 19 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
20 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" 20 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h"
21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
22 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 22 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
23 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
23 #include "chrome/browser/ui/ash/session_util.h" 24 #include "chrome/browser/ui/ash/session_util.h"
25 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/browser_commands.h" 26 #include "chrome/browser/ui/browser_commands.h"
25 #include "chrome/browser/ui/browser_finder.h" 27 #include "chrome/browser/ui/browser_finder.h"
26 #include "chrome/browser/ui/browser_navigator.h" 28 #include "chrome/browser/ui/browser_navigator.h"
27 #include "chrome/browser/ui/browser_navigator_params.h" 29 #include "chrome/browser/ui/browser_navigator_params.h"
30 #include "chrome/browser/ui/browser_tabstrip.h"
28 #include "chrome/browser/ui/browser_window.h" 31 #include "chrome/browser/ui/browser_window.h"
32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
29 #include "chrome/grit/chromium_strings.h" 33 #include "chrome/grit/chromium_strings.h"
30 #include "grit/theme_resources.h" 34 #include "grit/theme_resources.h"
31 #include "ui/base/l10n/l10n_util.h" 35 #include "ui/base/l10n/l10n_util.h"
32 #include "ui/base/resource/resource_bundle.h" 36 #include "ui/base/resource/resource_bundle.h"
33 37
34 #if defined(OS_CHROMEOS) 38 #if defined(OS_CHROMEOS)
35 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 39 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
36 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 40 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
37 #include "chrome/browser/chromeos/profiles/profile_helper.h" 41 #include "chrome/browser/chromeos/profiles/profile_helper.h"
38 #include "chrome/browser/chromeos/system/input_device_settings.h" 42 #include "chrome/browser/chromeos/system/input_device_settings.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ->GetBoolean(prefs::kForceMaximizeOnFirstRun); 117 ->GetBoolean(prefs::kForceMaximizeOnFirstRun);
114 } 118 }
115 #endif 119 #endif
116 return false; 120 return false;
117 } 121 }
118 122
119 void ChromeShellDelegate::Exit() { 123 void ChromeShellDelegate::Exit() {
120 chrome::AttemptUserExit(); 124 chrome::AttemptUserExit();
121 } 125 }
122 126
127 void ChromeShellDelegate::OpenUrl(const GURL& url) {
128 if (!url.is_valid())
129 return;
130
131 chrome::ScopedTabbedBrowserDisplayer displayer(
132 ProfileManager::GetActiveUserProfile());
133 chrome::AddSelectedTabWithURL(displayer.browser(), url,
134 ui::PAGE_TRANSITION_LINK);
135
136 // Since the ScopedTabbedBrowserDisplayer does not guarantee that the
137 // browser will be shown on the active desktop, we ensure the visibility.
138 multi_user_util::MoveWindowToCurrentDesktop(
139 displayer.browser()->window()->GetNativeWindow());
140 }
141
123 app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() { 142 app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() {
124 DCHECK(ash::Shell::HasInstance()); 143 DCHECK(ash::Shell::HasInstance());
125 return AppListServiceAsh::GetInstance()->GetViewDelegate( 144 return AppListServiceAsh::GetInstance()->GetViewDelegate(
126 Profile::FromBrowserContext(GetActiveBrowserContext())); 145 Profile::FromBrowserContext(GetActiveBrowserContext()));
127 } 146 }
128 147
129 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( 148 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
130 ash::ShelfModel* model) { 149 ash::ShelfModel* model) {
131 if (!shelf_delegate_) { 150 if (!shelf_delegate_) {
132 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); 151 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 220
202 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 221 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
203 ash::VirtualKeyboardStateObserver* observer) { 222 ash::VirtualKeyboardStateObserver* observer) {
204 keyboard_state_observer_list_.AddObserver(observer); 223 keyboard_state_observer_list_.AddObserver(observer);
205 } 224 }
206 225
207 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 226 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
208 ash::VirtualKeyboardStateObserver* observer) { 227 ash::VirtualKeyboardStateObserver* observer) {
209 keyboard_state_observer_list_.RemoveObserver(observer); 228 keyboard_state_observer_list_.RemoveObserver(observer);
210 } 229 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698