| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_SHELL_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/platform_app_host.h" |
| 10 #include "chrome/browser/sessions/session_id.h" | 11 #include "chrome/browser/sessions/session_id.h" |
| 11 #include "chrome/browser/extensions/extension_host.h" | |
| 12 #include "chrome/browser/ui/base_window.h" | 12 #include "chrome/browser/ui/base_window.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 | 15 |
| 16 class Extension; | 16 class Extension; |
| 17 class ExtensionHost; | |
| 18 class ExtensionWindowController; | 17 class ExtensionWindowController; |
| 19 class GURL; | 18 class GURL; |
| 20 class Profile; | 19 class Profile; |
| 21 | 20 |
| 22 namespace content { | 21 namespace content { |
| 23 class WebContents; | 22 class WebContents; |
| 24 } | 23 } |
| 25 | 24 |
| 26 class ShellWindow : public content::NotificationObserver, | 25 class ShellWindow : public content::NotificationObserver, |
| 27 public BaseWindow { | 26 public BaseWindow { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 40 static ShellWindow* Create(Profile* profile, | 39 static ShellWindow* Create(Profile* profile, |
| 41 const Extension* extension, | 40 const Extension* extension, |
| 42 const GURL& url); | 41 const GURL& url); |
| 43 | 42 |
| 44 // content::NotificationObserver implementation. | 43 // content::NotificationObserver implementation. |
| 45 virtual void Observe(int type, | 44 virtual void Observe(int type, |
| 46 const content::NotificationSource& source, | 45 const content::NotificationSource& source, |
| 47 const content::NotificationDetails& details) OVERRIDE; | 46 const content::NotificationDetails& details) OVERRIDE; |
| 48 | 47 |
| 49 protected: | 48 protected: |
| 50 explicit ShellWindow(ExtensionHost* host_); | 49 ShellWindow(PlatformAppHost* host_, const Extension* extension); |
| 51 virtual ~ShellWindow(); | 50 virtual ~ShellWindow(); |
| 52 | 51 |
| 53 // Instantiates a platform-specific ShellWindow subclass (one implementation | 52 // Instantiates a platform-specific ShellWindow subclass (one implementation |
| 54 // per platform). Public users of ShellWindow should use ShellWindow::Create. | 53 // per platform). Public users of ShellWindow should use ShellWindow::Create. |
| 55 static ShellWindow* CreateShellWindow(ExtensionHost* host); | 54 static ShellWindow* CreateShellWindow(PlatformAppHost* host, |
| 55 const Extension* extension); |
| 56 | 56 |
| 57 const SessionID session_id_; | 57 const SessionID session_id_; |
| 58 scoped_ptr<ExtensionHost> host_; | 58 scoped_ptr<PlatformAppHost> host_; |
| 59 const Extension* extension_; |
| 59 content::NotificationRegistrar registrar_; | 60 content::NotificationRegistrar registrar_; |
| 60 scoped_ptr<ExtensionWindowController> extension_window_controller_; | 61 scoped_ptr<ExtensionWindowController> extension_window_controller_; |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 64 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 67 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |