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

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

Issue 1124153007: Added the Ash.Tab.TimeBetweenSwitchToExistingTabUserActions histogram to track time between tab swit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the branch that the diff was based on. Created 5 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 unified diff | Download patch
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 "ash/content_support/gpu_support_impl.h" 7 #include "ash/content_support/gpu_support_impl.h"
8 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "chrome/browser/app_mode/app_mode_utils.h" 10 #include "chrome/browser/app_mode/app_mode_utils.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 11 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/profiles/profiles_state.h" 13 #include "chrome/browser/profiles/profiles_state.h"
14 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 14 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
15 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" 15 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
16 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" 16 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h"
17 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 17 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
18 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 18 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
19 #include "chrome/browser/ui/ash/metrics/user_metrics_recorder_proxy_impl.h"
19 #include "chrome/browser/ui/browser_commands.h" 20 #include "chrome/browser/ui/browser_commands.h"
20 #include "chrome/grit/chromium_strings.h" 21 #include "chrome/grit/chromium_strings.h"
21 #include "components/signin/core/common/profile_management_switches.h" 22 #include "components/signin/core/common/profile_management_switches.h"
22 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
23 24
24 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
25 #include "base/prefs/pref_service.h" 26 #include "base/prefs/pref_service.h"
26 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
27 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 28 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
28 #include "chrome/browser/chromeos/profiles/profile_helper.h" 29 #include "chrome/browser/chromeos/profiles/profile_helper.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root); 147 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root);
147 148
148 return new LauncherContextMenu(shelf_delegate_, root); 149 return new LauncherContextMenu(shelf_delegate_, root);
149 } 150 }
150 151
151 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { 152 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() {
152 // Chrome uses real GPU support. 153 // Chrome uses real GPU support.
153 return new ash::GPUSupportImpl; 154 return new ash::GPUSupportImpl;
154 } 155 }
155 156
157 ash::UserMetricsRecorderProxy*
158 ChromeShellDelegate::CreateUserMetricsRecorderProxy() {
159 return new UserMetricsRecorderProxyImpl;
160 }
161
156 base::string16 ChromeShellDelegate::GetProductName() const { 162 base::string16 ChromeShellDelegate::GetProductName() const {
157 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 163 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
158 } 164 }
159 165
160 keyboard::KeyboardControllerProxy* 166 keyboard::KeyboardControllerProxy*
161 ChromeShellDelegate::CreateKeyboardControllerProxy() { 167 ChromeShellDelegate::CreateKeyboardControllerProxy() {
162 return new AshKeyboardControllerProxy( 168 return new AshKeyboardControllerProxy(
163 ProfileManager::GetActiveUserProfile()); 169 ProfileManager::GetActiveUserProfile());
164 } 170 }
165 171
166 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) { 172 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) {
167 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, 173 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver,
168 keyboard_state_observer_list_, 174 keyboard_state_observer_list_,
169 OnVirtualKeyboardStateChanged(activated)); 175 OnVirtualKeyboardStateChanged(activated));
170 } 176 }
171 177
172 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 178 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
173 ash::VirtualKeyboardStateObserver* observer) { 179 ash::VirtualKeyboardStateObserver* observer) {
174 keyboard_state_observer_list_.AddObserver(observer); 180 keyboard_state_observer_list_.AddObserver(observer);
175 } 181 }
176 182
177 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 183 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
178 ash::VirtualKeyboardStateObserver* observer) { 184 ash::VirtualKeyboardStateObserver* observer) {
179 keyboard_state_observer_list_.RemoveObserver(observer); 185 keyboard_state_observer_list_.RemoveObserver(observer);
180 } 186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698