| 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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/host/root_window_host_factory.h" | 8 #include "ash/host/root_window_host_factory.h" |
| 9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
| 10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 launcher_delegate_(NULL) { | 51 launcher_delegate_(NULL) { |
| 52 instance_ = this; | 52 instance_ = this; |
| 53 PlatformInit(); | 53 PlatformInit(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 ChromeShellDelegate::~ChromeShellDelegate() { | 56 ChromeShellDelegate::~ChromeShellDelegate() { |
| 57 if (instance_ == this) | 57 if (instance_ == this) |
| 58 instance_ = NULL; | 58 instance_ = NULL; |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool ChromeShellDelegate::IsRunningInForcedAppMode() const { |
| 62 return chrome::IsRunningInForcedAppMode(); |
| 63 } |
| 64 |
| 61 void ChromeShellDelegate::UnlockScreen() { | 65 void ChromeShellDelegate::UnlockScreen() { |
| 62 // This is used only for testing thus far. | 66 // This is used only for testing thus far. |
| 63 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
| 64 } | 68 } |
| 65 | 69 |
| 66 void ChromeShellDelegate::Exit() { | 70 void ChromeShellDelegate::Exit() { |
| 67 chrome::AttemptUserExit(); | 71 chrome::AttemptUserExit(); |
| 68 } | 72 } |
| 69 | 73 |
| 70 void ChromeShellDelegate::NewTab() { | 74 void ChromeShellDelegate::NewTab() { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 294 } |
| 291 | 295 |
| 292 Browser* ChromeShellDelegate::GetTargetBrowser() { | 296 Browser* ChromeShellDelegate::GetTargetBrowser() { |
| 293 Browser* browser = chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()); | 297 Browser* browser = chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()); |
| 294 if (browser) | 298 if (browser) |
| 295 return browser; | 299 return browser; |
| 296 return chrome::FindOrCreateTabbedBrowser( | 300 return chrome::FindOrCreateTabbedBrowser( |
| 297 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 301 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
| 298 chrome::HOST_DESKTOP_TYPE_ASH); | 302 chrome::HOST_DESKTOP_TYPE_ASH); |
| 299 } | 303 } |
| OLD | NEW |