| 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 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // If true, don't show the window after creation. | 70 // If true, don't show the window after creation. |
| 71 bool hidden; | 71 bool hidden; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 static ShellWindow* Create(Profile* profile, | 74 static ShellWindow* Create(Profile* profile, |
| 75 const extensions::Extension* extension, | 75 const extensions::Extension* extension, |
| 76 const GURL& url, | 76 const GURL& url, |
| 77 const CreateParams& params); | 77 const CreateParams& params); |
| 78 | 78 |
| 79 // Specifies a url for the launcher icon. |
| 80 void SetLauncherIconUrl(const GURL& icon_url); |
| 81 |
| 79 // Convert draggable regions in raw format to SkRegion format. Caller is | 82 // Convert draggable regions in raw format to SkRegion format. Caller is |
| 80 // responsible for deleting the returned SkRegion instance. | 83 // responsible for deleting the returned SkRegion instance. |
| 81 static SkRegion* RawDraggableRegionsToSkRegion( | 84 static SkRegion* RawDraggableRegionsToSkRegion( |
| 82 const std::vector<extensions::DraggableRegion>& regions); | 85 const std::vector<extensions::DraggableRegion>& regions); |
| 83 | 86 |
| 84 const std::string& window_key() const { return window_key_; } | 87 const std::string& window_key() const { return window_key_; } |
| 85 const SessionID& session_id() const { return session_id_; } | 88 const SessionID& session_id() const { return session_id_; } |
| 86 const extensions::Extension* extension() const { return extension_; } | 89 const extensions::Extension* extension() const { return extension_; } |
| 87 content::WebContents* web_contents() const { return web_contents_.get(); } | 90 content::WebContents* web_contents() const { return web_contents_.get(); } |
| 88 Profile* profile() const { return profile_; } | 91 Profile* profile() const { return profile_; } |
| 89 const gfx::Image& app_icon() const { return app_icon_; } | 92 const gfx::Image& app_icon() const { return app_icon_; } |
| 93 const GURL& launcher_icon_url() { return launcher_icon_url_; } |
| 90 | 94 |
| 91 BaseWindow* GetBaseWindow(); | 95 BaseWindow* GetBaseWindow(); |
| 92 gfx::NativeWindow GetNativeWindow() { | 96 gfx::NativeWindow GetNativeWindow() { |
| 93 return GetBaseWindow()->GetNativeWindow(); | 97 return GetBaseWindow()->GetNativeWindow(); |
| 94 } | 98 } |
| 95 | 99 |
| 96 // NativeAppWindows should call this to determine what the window's title | 100 // NativeAppWindows should call this to determine what the window's title |
| 97 // is on startup and from within UpdateWindowTitle(). | 101 // is on startup and from within UpdateWindowTitle(). |
| 98 virtual string16 GetTitle() const; | 102 virtual string16 GetTitle() const; |
| 99 | 103 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 scoped_ptr<content::WebContents> web_contents_; | 208 scoped_ptr<content::WebContents> web_contents_; |
| 205 content::NotificationRegistrar registrar_; | 209 content::NotificationRegistrar registrar_; |
| 206 ExtensionFunctionDispatcher extension_function_dispatcher_; | 210 ExtensionFunctionDispatcher extension_function_dispatcher_; |
| 207 | 211 |
| 208 // Icon showed in the task bar. | 212 // Icon showed in the task bar. |
| 209 gfx::Image app_icon_; | 213 gfx::Image app_icon_; |
| 210 | 214 |
| 211 // Used for loading app_icon_. | 215 // Used for loading app_icon_. |
| 212 scoped_ptr<ImageLoadingTracker> app_icon_loader_; | 216 scoped_ptr<ImageLoadingTracker> app_icon_loader_; |
| 213 | 217 |
| 218 // Icon URL to be used for setting the launcher icon. If empty, the app icon |
| 219 // should be used. |
| 220 GURL launcher_icon_url_; |
| 221 |
| 214 scoped_ptr<NativeAppWindow> native_app_window_; | 222 scoped_ptr<NativeAppWindow> native_app_window_; |
| 215 | 223 |
| 216 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 224 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 217 }; | 225 }; |
| 218 | 226 |
| 219 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 227 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |