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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "extensions/browser/app_window/app_window_client.h"
13 struct DefaultSingletonTraits
;
15 // The implementation of AppWindowClient for Chrome.
16 class ChromeAppWindowClient
: public extensions::AppWindowClient
{
18 ChromeAppWindowClient();
19 ~ChromeAppWindowClient() override
;
21 // Get the LazyInstance for ChromeAppWindowClient.
22 static ChromeAppWindowClient
* GetInstance();
25 friend struct DefaultSingletonTraits
<ChromeAppWindowClient
>;
27 // extensions::AppWindowClient
28 extensions::AppWindow
* CreateAppWindow(
29 content::BrowserContext
* context
,
30 const extensions::Extension
* extension
) override
;
31 extensions::NativeAppWindow
* CreateNativeAppWindow(
32 extensions::AppWindow
* window
,
33 extensions::AppWindow::CreateParams
* params
) override
;
34 void OpenDevToolsWindow(content::WebContents
* web_contents
,
35 const base::Closure
& callback
) override
;
36 bool IsCurrentChannelOlderThanDev() override
;
38 // Implemented in platform specific code.
39 static extensions::NativeAppWindow
* CreateNativeAppWindowImpl(
40 extensions::AppWindow
* window
,
41 const extensions::AppWindow::CreateParams
& params
);
43 DISALLOW_COPY_AND_ASSIGN(ChromeAppWindowClient
);
46 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_