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

Side by Side Diff: extensions/browser/app_window/app_window_client.h

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 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
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 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "extensions/browser/app_window/app_window.h"
10 9
11 namespace content { 10 namespace content {
12 class BrowserContext; 11 class BrowserContext;
13 class WebContents; 12 class WebContents;
14 } 13 }
15 14
15 namespace native_app_window {
16 class AppWindowCreateParams;
17 class NativeAppWindow;
18 }
19
16 namespace extensions { 20 namespace extensions {
17 21
22 class AppWindow;
18 class Extension; 23 class Extension;
19 class NativeAppWindow;
20 24
21 // Sets up global state for the app window system. Should be Set() once in each 25 // Sets up global state for the app window system. Should be Set() once in each
22 // process. This should be implemented by the client of the app window system. 26 // process. This should be implemented by the client of the app window system.
23 // TODO(hashimoto): Move some functions to ExtensionsClient. 27 // TODO(hashimoto): Move some functions to ExtensionsClient.
24 class AppWindowClient { 28 class AppWindowClient {
25 public: 29 public:
26 virtual ~AppWindowClient() {} 30 virtual ~AppWindowClient() {}
27 31
28 // Creates a new AppWindow for the app in |extension| for |context|. 32 // Creates a new AppWindow for the app in |extension| for |context|.
29 // Caller takes ownership. 33 // Caller takes ownership.
30 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, 34 virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
31 const Extension* extension) = 0; 35 const Extension* extension) = 0;
32 36
33 // Creates a new extensions::NativeAppWindow for |window|. 37 // Creates a new extensions::NativeAppWindow for |window|.
34 virtual NativeAppWindow* CreateNativeAppWindow( 38 virtual native_app_window::NativeAppWindow* CreateNativeAppWindow(
35 AppWindow* window, 39 AppWindow* window,
36 const AppWindow::CreateParams& params) = 0; 40 const native_app_window::AppWindowCreateParams& params) = 0;
37 41
38 // Opens DevTools window and runs the callback. 42 // Opens DevTools window and runs the callback.
39 virtual void OpenDevToolsWindow(content::WebContents* web_contents, 43 virtual void OpenDevToolsWindow(content::WebContents* web_contents,
40 const base::Closure& callback) = 0; 44 const base::Closure& callback) = 0;
41 45
42 // Returns true if the current channel is older than dev. 46 // Returns true if the current channel is older than dev.
43 virtual bool IsCurrentChannelOlderThanDev() = 0; 47 virtual bool IsCurrentChannelOlderThanDev() = 0;
44 48
45 // Return the app window client. 49 // Return the app window client.
46 static AppWindowClient* Get(); 50 static AppWindowClient* Get();
47 51
48 // Initialize the app window system with this app window client. 52 // Initialize the app window system with this app window client.
49 static void Set(AppWindowClient* client); 53 static void Set(AppWindowClient* client);
50 }; 54 };
51 55
52 } // namespace extensions 56 } // namespace extensions
53 57
54 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ 58 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_window.cc ('k') | extensions/browser/app_window/app_window_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698