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

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

Issue 10803037: [WIP] ash/extensions: Add experimental extension support for window-management in ash. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-152100 Created 8 years, 4 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 | 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/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "chrome/browser/chromeos/login/screen_locker.h" 11 #include "chrome/browser/chromeos/login/screen_locker.h"
12 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 12 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
13 #include "chrome/browser/lifetime/application_lifetime.h" 13 #include "chrome/browser/lifetime/application_lifetime.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/sessions/tab_restore_service.h" 15 #include "chrome/browser/sessions/tab_restore_service.h"
16 #include "chrome/browser/sessions/tab_restore_service_factory.h" 16 #include "chrome/browser/sessions/tab_restore_service_factory.h"
17 #include "chrome/browser/ui/ash/app_list/app_list_view_delegate.h" 17 #include "chrome/browser/ui/ash/app_list/app_list_view_delegate.h"
18 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 18 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
19 #include "chrome/browser/ui/ash/user_action_handler.h" 19 #include "chrome/browser/ui/ash/user_action_handler.h"
20 #include "chrome/browser/ui/ash/window_positioner.h" 20 #include "chrome/browser/ui/ash/window_positioner.h"
21 #include "chrome/browser/ui/browser.h" 21 #include "chrome/browser/ui/browser.h"
22 #include "chrome/browser/ui/browser_commands.h" 22 #include "chrome/browser/ui/browser_commands.h"
23 #include "chrome/browser/ui/browser_finder.h" 23 #include "chrome/browser/ui/browser_finder.h"
24 #include "chrome/browser/ui/views/ash/window_manager_extension.h"
24 #include "chrome/browser/ui/views/frame/browser_view.h" 25 #include "chrome/browser/ui/views/frame/browser_view.h"
25 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" 26 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
26 #include "chrome/common/chrome_notification_types.h" 27 #include "chrome/common/chrome_notification_types.h"
27 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/url_constants.h" 29 #include "chrome/common/url_constants.h"
29 #include "content/public/browser/notification_service.h" 30 #include "content/public/browser/notification_service.h"
30 #include "content/public/browser/user_metrics.h" 31 #include "content/public/browser/user_metrics.h"
31 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
32 #include "grit/generated_resources.h" 33 #include "grit/generated_resources.h"
33 #include "ui/aura/client/user_action_client.h" 34 #include "ui/aura/client/user_action_client.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return chromeos::CreateUserWallpaperDelegate(); 316 return chromeos::CreateUserWallpaperDelegate();
316 #else 317 #else
317 return NULL; 318 return NULL;
318 #endif 319 #endif
319 } 320 }
320 321
321 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { 322 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() {
322 return new UserActionHandler; 323 return new UserActionHandler;
323 } 324 }
324 325
326 ash::WindowManagerExtensionDelegate*
327 ChromeShellDelegate::CreateWindowManagerDelegate() {
328 return new WindowManagerExtension();
329 }
330
325 void ChromeShellDelegate::OpenFeedbackPage() { 331 void ChromeShellDelegate::OpenFeedbackPage() {
326 chrome::OpenFeedbackDialog(GetTargetBrowser()); 332 chrome::OpenFeedbackDialog(GetTargetBrowser());
327 } 333 }
328 334
329 void ChromeShellDelegate::RecordUserMetricsAction( 335 void ChromeShellDelegate::RecordUserMetricsAction(
330 ash::UserMetricsAction action) { 336 ash::UserMetricsAction action) {
331 switch (action) { 337 switch (action) {
332 case ash::UMA_ACCEL_PREVWINDOW_TAB: 338 case ash::UMA_ACCEL_PREVWINDOW_TAB:
333 content::RecordAction(content::UserMetricsAction("Accel_PrevWindow_Tab")); 339 content::RecordAction(content::UserMetricsAction("Accel_PrevWindow_Tab"));
334 break; 340 break;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ash::Shell::GetInstance()->ShowLauncher(); 381 ash::Shell::GetInstance()->ShowLauncher();
376 break; 382 break;
377 default: 383 default:
378 NOTREACHED() << "Unexpected notification " << type; 384 NOTREACHED() << "Unexpected notification " << type;
379 } 385 }
380 #else 386 #else
381 // MSVC++ warns about switch statements without any cases. 387 // MSVC++ warns about switch statements without any cases.
382 NOTREACHED() << "Unexpected notification " << type; 388 NOTREACHED() << "Unexpected notification " << type;
383 #endif 389 #endif
384 } 390 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/views/ash/window_manager_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698