| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 FRAME_NONE, // Frameless window. | 54 FRAME_NONE, // Frameless window. |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 struct CreateParams { | 57 struct CreateParams { |
| 58 CreateParams(); | 58 CreateParams(); |
| 59 ~CreateParams(); | 59 ~CreateParams(); |
| 60 | 60 |
| 61 WindowType window_type; | 61 WindowType window_type; |
| 62 Frame frame; | 62 Frame frame; |
| 63 | 63 |
| 64 // Specify the initial bounds of the window. INT_MIN designates | 64 // Specify the initial content bounds of the window (excluding any window |
| 65 // 'unspecified' for any coordinate, and should be replaced with a default | 65 // decorations). INT_MIN designates 'unspecified' for any coordinate, and |
| 66 // value. | 66 // should be replaced with a default value. |
| 67 gfx::Rect bounds; | 67 gfx::Rect bounds; |
| 68 | 68 |
| 69 gfx::Size minimum_size; | 69 gfx::Size minimum_size; |
| 70 gfx::Size maximum_size; | 70 gfx::Size maximum_size; |
| 71 | 71 |
| 72 std::string window_key; | 72 std::string window_key; |
| 73 | 73 |
| 74 // The process ID of the process that requested the create. | 74 // The process ID of the process that requested the create. |
| 75 int32 creator_process_id; | 75 int32 creator_process_id; |
| 76 | 76 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 89 const std::vector<extensions::DraggableRegion>& regions); | 89 const std::vector<extensions::DraggableRegion>& regions); |
| 90 | 90 |
| 91 const std::string& window_key() const { return window_key_; } | 91 const std::string& window_key() const { return window_key_; } |
| 92 const SessionID& session_id() const { return session_id_; } | 92 const SessionID& session_id() const { return session_id_; } |
| 93 const extensions::Extension* extension() const { return extension_; } | 93 const extensions::Extension* extension() const { return extension_; } |
| 94 content::WebContents* web_contents() const { return web_contents_.get(); } | 94 content::WebContents* web_contents() const { return web_contents_.get(); } |
| 95 WindowType window_type() const { return window_type_; } | 95 WindowType window_type() const { return window_type_; } |
| 96 Profile* profile() const { return profile_; } | 96 Profile* profile() const { return profile_; } |
| 97 const gfx::Image& app_icon() const { return app_icon_; } | 97 const gfx::Image& app_icon() const { return app_icon_; } |
| 98 | 98 |
| 99 BaseWindow* GetBaseWindow(); | 99 NativeAppWindow* GetBaseWindow(); |
| 100 gfx::NativeWindow GetNativeWindow() { | 100 gfx::NativeWindow GetNativeWindow(); |
| 101 return GetBaseWindow()->GetNativeWindow(); | |
| 102 } | |
| 103 | 101 |
| 104 // NativeAppWindows should call this to determine what the window's title | 102 // NativeAppWindows should call this to determine what the window's title |
| 105 // is on startup and from within UpdateWindowTitle(). | 103 // is on startup and from within UpdateWindowTitle(). |
| 106 virtual string16 GetTitle() const; | 104 virtual string16 GetTitle() const; |
| 107 | 105 |
| 108 // Call to notify ShellRegistry and delete the window. Subclasses should | 106 // Call to notify ShellRegistry and delete the window. Subclasses should |
| 109 // invoke this method instead of using "delete this". | 107 // invoke this method instead of using "delete this". |
| 110 void OnNativeClose(); | 108 void OnNativeClose(); |
| 111 | 109 |
| 112 // Should be called by native implementations when the window size, position, | 110 // Should be called by native implementations when the window size, position, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 220 |
| 223 // Used for loading app_icon_. | 221 // Used for loading app_icon_. |
| 224 scoped_ptr<ImageLoadingTracker> app_icon_loader_; | 222 scoped_ptr<ImageLoadingTracker> app_icon_loader_; |
| 225 | 223 |
| 226 scoped_ptr<NativeAppWindow> native_app_window_; | 224 scoped_ptr<NativeAppWindow> native_app_window_; |
| 227 | 225 |
| 228 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 226 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 229 }; | 227 }; |
| 230 | 228 |
| 231 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 229 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |