OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/chrome_apps_client.h" | 5 #include "chrome/browser/ui/apps/chrome_apps_client.h" |
6 | 6 |
7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/devtools/devtools_window.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
| 12 #include "chrome/common/extensions/features/feature_channel.h" |
11 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
12 | 14 |
13 // TODO(jamescook): We probably shouldn't compile this class at all on Android. | 15 // TODO(jamescook): We probably shouldn't compile this class at all on Android. |
14 // See http://crbug.com/343612 | 16 // See http://crbug.com/343612 |
15 #if !defined(OS_ANDROID) | 17 #if !defined(OS_ANDROID) |
16 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
17 #include "chrome/browser/ui/apps/chrome_app_delegate.h" | 19 #include "chrome/browser/ui/apps/chrome_app_delegate.h" |
18 #endif | 20 #endif |
19 | 21 |
20 ChromeAppsClient::ChromeAppsClient() { | 22 ChromeAppsClient::ChromeAppsClient() { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #if !defined(OS_ANDROID) | 63 #if !defined(OS_ANDROID) |
62 chrome::IncrementKeepAliveCount(); | 64 chrome::IncrementKeepAliveCount(); |
63 #endif | 65 #endif |
64 } | 66 } |
65 | 67 |
66 void ChromeAppsClient::DecrementKeepAliveCount() { | 68 void ChromeAppsClient::DecrementKeepAliveCount() { |
67 #if !defined(OS_ANDROID) | 69 #if !defined(OS_ANDROID) |
68 chrome::DecrementKeepAliveCount(); | 70 chrome::DecrementKeepAliveCount(); |
69 #endif | 71 #endif |
70 } | 72 } |
| 73 |
| 74 void ChromeAppsClient::OpenDevToolsWindow(content::WebContents* web_contents, |
| 75 const base::Closure& callback) { |
| 76 DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindow( |
| 77 web_contents, DevToolsToggleAction::ShowConsole()); |
| 78 devtools_window->SetLoadCompletedCallback(callback); |
| 79 } |
| 80 |
| 81 bool ChromeAppsClient::IsCurrentChannelOlderThanDev() { |
| 82 return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; |
| 83 } |
OLD | NEW |