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

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

Issue 1708343002: Add ScopedKeepAlive to c/b/lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove KeepAliveOrigin::TEST Created 4 years, 9 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 "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/apps/scoped_keep_alive.h"
10 #include "chrome/browser/devtools/devtools_window.h" 9 #include "chrome/browser/devtools/devtools_window.h"
11 #include "chrome/common/extensions/features/feature_channel.h" 10 #include "chrome/common/extensions/features/feature_channel.h"
12 #include "components/version_info/version_info.h" 11 #include "components/version_info/version_info.h"
13 #include "content/public/browser/devtools_agent_host.h" 12 #include "content/public/browser/devtools_agent_host.h"
14 #include "extensions/browser/app_window/app_window.h" 13 #include "extensions/browser/app_window/app_window.h"
15 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
16 15
17 // 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.
18 // See http://crbug.com/343612 17 // See http://crbug.com/343612
19 #if !defined(OS_ANDROID) 18 #if !defined(OS_ANDROID)
(...skipping 12 matching lines...) Expand all
32 ChromeAppWindowClient, 31 ChromeAppWindowClient,
33 base::LeakySingletonTraits<ChromeAppWindowClient>>::get(); 32 base::LeakySingletonTraits<ChromeAppWindowClient>>::get();
34 } 33 }
35 34
36 extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow( 35 extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow(
37 content::BrowserContext* context, 36 content::BrowserContext* context,
38 const extensions::Extension* extension) { 37 const extensions::Extension* extension) {
39 #if defined(OS_ANDROID) 38 #if defined(OS_ANDROID)
40 return NULL; 39 return NULL;
41 #else 40 #else
42 return new extensions::AppWindow( 41 return new extensions::AppWindow(context, new ChromeAppDelegate(true),
43 context, 42 extension);
44 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)),
45 extension);
46 #endif 43 #endif
47 } 44 }
48 45
49 extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindow( 46 extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindow(
50 extensions::AppWindow* window, 47 extensions::AppWindow* window,
51 extensions::AppWindow::CreateParams* params) { 48 extensions::AppWindow::CreateParams* params) {
52 #if defined(OS_ANDROID) 49 #if defined(OS_ANDROID)
53 return NULL; 50 return NULL;
54 #else 51 #else
55 return CreateNativeAppWindowImpl(window, *params); 52 return CreateNativeAppWindowImpl(window, *params);
(...skipping 11 matching lines...) Expand all
67 DevToolsWindow::FindDevToolsWindow(agent.get()); 64 DevToolsWindow::FindDevToolsWindow(agent.get());
68 if (devtools_window) 65 if (devtools_window)
69 devtools_window->SetLoadCompletedCallback(callback); 66 devtools_window->SetLoadCompletedCallback(callback);
70 else 67 else
71 callback.Run(); 68 callback.Run();
72 } 69 }
73 70
74 bool ChromeAppWindowClient::IsCurrentChannelOlderThanDev() { 71 bool ChromeAppWindowClient::IsCurrentChannelOlderThanDev() {
75 return extensions::GetCurrentChannel() > version_info::Channel::DEV; 72 return extensions::GetCurrentChannel() > version_info::Channel::DEV;
76 } 73 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_delegate.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698