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