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

Side by Side Diff: chrome/browser/ui/apps/chrome_app_window_client.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 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_app_window_client.h" 5 #include "chrome/browser/ui/apps/chrome_app_window_client.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/apps/scoped_keep_alive.h" 8 #include "chrome/browser/apps/scoped_keep_alive.h"
9 #include "chrome/browser/devtools/devtools_window.h" 9 #include "chrome/browser/devtools/devtools_window.h"
10 #include "chrome/common/extensions/features/feature_channel.h" 10 #include "chrome/common/extensions/features/feature_channel.h"
11 #include "components/version_info/version_info.h" 11 #include "components/version_info/version_info.h"
12 #include "content/public/browser/devtools_agent_host.h" 12 #include "content/public/browser/devtools_agent_host.h"
13 #include "extensions/browser/app_window/app_window.h" 13 #include "extensions/browser/app_window/app_window.h"
14 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
15 15
16 // TODO(jamescook): We probably shouldn't compile this class at all on Android. 16 // TODO(jamescook): We probably shouldn't compile this class at all on Android.
17 // See http://crbug.com/343612 17 // See http://crbug.com/343612
18 #if !defined(OS_ANDROID) 18 #if !defined(OS_ANDROID)
19 #include "chrome/browser/ui/apps/chrome_app_delegate.h" 19 #include "chrome/browser/ui/apps/chrome_app_delegate.h"
20 #endif 20 #endif
21 21
22 ChromeAppWindowClient::ChromeAppWindowClient() { 22 ChromeAppWindowClient::ChromeAppWindowClient() {
23 } 23 }
24 24
25 ChromeAppWindowClient::~ChromeAppWindowClient() { 25 ChromeAppWindowClient::~ChromeAppWindowClient() {
26 } 26 }
27 27
28 // static 28 // static
29 ChromeAppWindowClient* ChromeAppWindowClient::GetInstance() { 29 ChromeAppWindowClient* ChromeAppWindowClient::GetInstance() {
30 return Singleton<ChromeAppWindowClient, 30 return base::Singleton<
31 LeakySingletonTraits<ChromeAppWindowClient> >::get(); 31 ChromeAppWindowClient,
32 base::LeakySingletonTraits<ChromeAppWindowClient>>::get();
32 } 33 }
33 34
34 extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow( 35 extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow(
35 content::BrowserContext* context, 36 content::BrowserContext* context,
36 const extensions::Extension* extension) { 37 const extensions::Extension* extension) {
37 #if defined(OS_ANDROID) 38 #if defined(OS_ANDROID)
38 return NULL; 39 return NULL;
39 #else 40 #else
40 return new extensions::AppWindow( 41 return new extensions::AppWindow(
41 context, 42 context,
(...skipping 23 matching lines...) Expand all
65 DevToolsWindow::FindDevToolsWindow(agent.get()); 66 DevToolsWindow::FindDevToolsWindow(agent.get());
66 if (devtools_window) 67 if (devtools_window)
67 devtools_window->SetLoadCompletedCallback(callback); 68 devtools_window->SetLoadCompletedCallback(callback);
68 else 69 else
69 callback.Run(); 70 callback.Run();
70 } 71 }
71 72
72 bool ChromeAppWindowClient::IsCurrentChannelOlderThanDev() { 73 bool ChromeAppWindowClient::IsCurrentChannelOlderThanDev() {
73 return extensions::GetCurrentChannel() > version_info::Channel::DEV; 74 return extensions::GetCurrentChannel() > version_info::Channel::DEV;
74 } 75 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_window_client.h ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698