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

Side by Side Diff: apps/apps_client.h

Issue 25034003: Moved apps metro code from apps to chrome/browser/apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix unit test Created 7 years, 2 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
« no previous file with comments | « apps/apps.gypi ('k') | apps/launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef APPS_APPS_CLIENT_H_ 5 #ifndef APPS_APPS_CLIENT_H_
6 #define APPS_APPS_CLIENT_H_ 6 #define APPS_APPS_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 namespace content { 10 namespace content {
11 class BrowserContext; 11 class BrowserContext;
12 } 12 }
13 13
14 namespace extensions {
15 class Extension;
16 }
17
14 namespace apps { 18 namespace apps {
15 19
16 // Sets up global state for the apps system. Should be Set() once in each 20 // Sets up global state for the apps system. Should be Set() once in each
17 // process. This should be implemented by the client of the apps system. 21 // process. This should be implemented by the client of the apps system.
18 class AppsClient { 22 class AppsClient {
19 public: 23 public:
20 // Get all loaded browser contexts. 24 // Get all loaded browser contexts.
21 virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts() = 0; 25 virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts() = 0;
22 26
27 // Do any pre app launch checks. Returns true if the app launch should proceed
28 // or false if the launch should be prevented.
29 virtual bool CheckAppLaunch(content::BrowserContext* context,
30 const extensions::Extension* extension) = 0;
31
23 // Return the apps client. 32 // Return the apps client.
24 static AppsClient* Get(); 33 static AppsClient* Get();
25 34
26 // Initialize the apps system with this apps client. 35 // Initialize the apps system with this apps client.
27 static void Set(AppsClient* client); 36 static void Set(AppsClient* client);
28 }; 37 };
29 38
30 } // namespace apps 39 } // namespace apps
31 40
32 #endif // APPS_APPS_CLIENT_H_ 41 #endif // APPS_APPS_CLIENT_H_
OLDNEW
« no previous file with comments | « apps/apps.gypi ('k') | apps/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698