| 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/extension_function_dispatcher.h" | 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 gfx::Rect bounds; | 52 gfx::Rect bounds; |
| 53 gfx::Size minimum_size; | 53 gfx::Size minimum_size; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 static ShellWindow* Create(Profile* profile, | 56 static ShellWindow* Create(Profile* profile, |
| 57 const extensions::Extension* extension, | 57 const extensions::Extension* extension, |
| 58 const GURL& url, | 58 const GURL& url, |
| 59 const CreateParams params); | 59 const CreateParams params); |
| 60 | 60 |
| 61 const SessionID& session_id() const { return session_id_; } | 61 const SessionID& session_id() const { return session_id_; } |
| 62 const ExtensionWindowController* extension_window_controller() const { | |
| 63 return extension_window_controller_.get(); | |
| 64 } | |
| 65 const extensions::Extension* extension() const { return extension_; } | 62 const extensions::Extension* extension() const { return extension_; } |
| 66 content::WebContents* web_contents() const { return web_contents_; } | 63 content::WebContents* web_contents() const { return web_contents_; } |
| 67 | 64 |
| 68 protected: | 65 protected: |
| 69 ShellWindow(Profile* profile, | 66 ShellWindow(Profile* profile, |
| 70 const extensions::Extension* extension, | 67 const extensions::Extension* extension, |
| 71 const GURL& url); | 68 const GURL& url); |
| 72 virtual ~ShellWindow(); | 69 virtual ~ShellWindow(); |
| 73 | 70 |
| 74 // Called when the title of the window changes. | 71 // Called when the title of the window changes. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 118 |
| 122 Profile* profile_; // weak pointer - owned by ProfileManager. | 119 Profile* profile_; // weak pointer - owned by ProfileManager. |
| 123 // weak pointer - owned by ExtensionService. | 120 // weak pointer - owned by ExtensionService. |
| 124 const extensions::Extension* extension_; | 121 const extensions::Extension* extension_; |
| 125 | 122 |
| 126 const SessionID session_id_; | 123 const SessionID session_id_; |
| 127 scoped_ptr<TabContentsWrapper> contents_wrapper_; | 124 scoped_ptr<TabContentsWrapper> contents_wrapper_; |
| 128 // web_contents_ is owned by contents_wrapper_. | 125 // web_contents_ is owned by contents_wrapper_. |
| 129 content::WebContents* web_contents_; | 126 content::WebContents* web_contents_; |
| 130 content::NotificationRegistrar registrar_; | 127 content::NotificationRegistrar registrar_; |
| 131 scoped_ptr<ExtensionWindowController> extension_window_controller_; | |
| 132 ExtensionFunctionDispatcher extension_function_dispatcher_; | 128 ExtensionFunctionDispatcher extension_function_dispatcher_; |
| 133 | 129 |
| 134 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 130 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 135 }; | 131 }; |
| 136 | 132 |
| 137 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 133 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |