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/aura/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/views/aura/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/partial_screenshot_view.h" | 9 #include "ash/wm/partial_screenshot_view.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | |
13 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
15 #include "chrome/browser/ui/views/aura/app_list/app_list_model_builder.h" | |
16 #include "chrome/browser/ui/views/aura/app_list/app_list_view_delegate.h" | 14 #include "chrome/browser/ui/views/aura/app_list/app_list_view_delegate.h" |
17 #include "chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.h" | 15 #include "chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.h" |
18 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" | 16 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" |
19 #include "chrome/browser/ui/views/frame/browser_view.h" | 17 #include "chrome/browser/ui/views/frame/browser_view.h" |
20 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
21 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
22 | 20 |
23 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
24 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 22 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
25 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 23 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 69 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
72 NotifyScreenLockRequested(); | 70 NotifyScreenLockRequested(); |
73 } | 71 } |
74 } | 72 } |
75 #endif | 73 #endif |
76 | 74 |
77 void ChromeShellDelegate::Exit() { | 75 void ChromeShellDelegate::Exit() { |
78 BrowserList::AttemptUserExit(); | 76 BrowserList::AttemptUserExit(); |
79 } | 77 } |
80 | 78 |
81 void ChromeShellDelegate::BuildAppListModel(ash::AppListModel* model) { | |
82 AppListModelBuilder builder(ProfileManager::GetDefaultProfile(), | |
83 model); | |
84 builder.Build(); | |
85 } | |
86 | |
87 ash::AppListViewDelegate* | 79 ash::AppListViewDelegate* |
88 ChromeShellDelegate::CreateAppListViewDelegate() { | 80 ChromeShellDelegate::CreateAppListViewDelegate() { |
89 // Shell will own the created delegate. | 81 // Shell will own the created delegate. |
90 return new AppListViewDelegate; | 82 return new AppListViewDelegate; |
91 } | 83 } |
92 | 84 |
93 std::vector<aura::Window*> ChromeShellDelegate::GetCycleWindowList( | 85 std::vector<aura::Window*> ChromeShellDelegate::GetCycleWindowList( |
94 CycleSource source, | 86 CycleSource source, |
95 CycleOrder order) const { | 87 CycleOrder order) const { |
96 std::vector<aura::Window*> windows; | 88 std::vector<aura::Window*> windows; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return chromeos::CreateSystemTrayDelegate(tray); | 122 return chromeos::CreateSystemTrayDelegate(tray); |
131 #else | 123 #else |
132 return NULL; | 124 return NULL; |
133 #endif | 125 #endif |
134 } | 126 } |
135 | 127 |
136 bool ChromeShellDelegate::GetOverrideWindowMode( | 128 bool ChromeShellDelegate::GetOverrideWindowMode( |
137 ash::Shell::WindowMode* window_mode) { | 129 ash::Shell::WindowMode* window_mode) { |
138 return false; | 130 return false; |
139 } | 131 } |
OLD | NEW |