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

Side by Side Diff: chrome/browser/apps/chrome_apps_client.cc

Issue 171523005: BACKUP: NativeAppWindowView - before splitting CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/chrome_apps_client.h" 5 #include "chrome/browser/apps/chrome_apps_client.h"
6 6
7 #include "apps/app_window.h"
7 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
8 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h" 11 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h"
11 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
12 13
13 #if defined(OS_WIN) 14 #if defined(OS_WIN)
14 #include "win8/util/win8_util.h" 15 #include "win8/util/win8_util.h"
15 #endif 16 #endif
16 17
18 // TODO(jamescook): We probably shouldn't compile this class at all on Android.
19 // See http://crbug.com/343612
20 #if !defined(OS_ANDROID)
21 #include "chrome/browser/lifetime/application_lifetime.h"
22 #include "chrome/browser/ui/apps/chrome_app_window_delegate.h"
23 #endif
24
17 ChromeAppsClient::ChromeAppsClient() {} 25 ChromeAppsClient::ChromeAppsClient() {}
18 26
19 ChromeAppsClient::~ChromeAppsClient() {} 27 ChromeAppsClient::~ChromeAppsClient() {}
20 28
21 // static 29 // static
22 ChromeAppsClient* ChromeAppsClient::GetInstance() { 30 ChromeAppsClient* ChromeAppsClient::GetInstance() {
23 return Singleton<ChromeAppsClient, 31 return Singleton<ChromeAppsClient,
24 LeakySingletonTraits<ChromeAppsClient> >::get(); 32 LeakySingletonTraits<ChromeAppsClient> >::get();
25 } 33 }
26 34
(...skipping 13 matching lines...) Expand all
40 if (win8::IsSingleWindowMetroMode()) { 48 if (win8::IsSingleWindowMetroMode()) {
41 AppMetroInfoBarDelegateWin::Create( 49 AppMetroInfoBarDelegateWin::Create(
42 Profile::FromBrowserContext(context), 50 Profile::FromBrowserContext(context),
43 AppMetroInfoBarDelegateWin::LAUNCH_PACKAGED_APP, 51 AppMetroInfoBarDelegateWin::LAUNCH_PACKAGED_APP,
44 extension->id()); 52 extension->id());
45 return false; 53 return false;
46 } 54 }
47 #endif 55 #endif
48 return true; 56 return true;
49 } 57 }
58
59 apps::AppWindow* ChromeAppsClient::CreateAppWindow(
60 content::BrowserContext* context,
61 const extensions::Extension* extension) {
62 #if defined(OS_ANDROID)
63 return NULL;
64 #else
65 return new apps::AppWindow(
66 context, new ChromeAppWindowDelegate, extension);
67 #endif
68 }
69
70 void ChromeAppsClient::StartKeepAlive() {
71 #if !defined(OS_ANDROID)
72 chrome::StartKeepAlive();
73 #endif
74 }
75
76 void ChromeAppsClient::EndKeepAlive() {
77 #if !defined(OS_ANDROID)
78 chrome::EndKeepAlive();
79 #endif
80 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/chrome_apps_client.h ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698