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 EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 class AppWindow : public content::WebContentsDelegate, | 87 class AppWindow : public content::WebContentsDelegate, |
88 public content::WebContentsObserver, | 88 public content::WebContentsObserver, |
89 public web_modal::WebContentsModalDialogManagerDelegate, | 89 public web_modal::WebContentsModalDialogManagerDelegate, |
90 public IconImage::Observer, | 90 public IconImage::Observer, |
91 public ExtensionFunctionDispatcher::Delegate, | 91 public ExtensionFunctionDispatcher::Delegate, |
92 public ExtensionRegistryObserver { | 92 public ExtensionRegistryObserver { |
93 public: | 93 public: |
94 enum WindowType { | 94 enum WindowType { |
95 WINDOW_TYPE_DEFAULT = 1 << 0, // Default app window. | 95 WINDOW_TYPE_DEFAULT = 1 << 0, // Default app window. |
96 WINDOW_TYPE_PANEL = 1 << 1, // OS controlled panel window (Ash only). | 96 WINDOW_TYPE_PANEL = 1 << 1, // OS controlled panel window (Ash only). |
97 WINDOW_TYPE_V1_PANEL = 1 << 2, // For apps v1 support in Ash; deprecate | |
98 // with v1 apps. | |
99 }; | 97 }; |
100 | 98 |
101 enum Frame { | 99 enum Frame { |
102 FRAME_CHROME, // Chrome-style window frame. | 100 FRAME_CHROME, // Chrome-style window frame. |
103 FRAME_NONE, // Frameless window. | 101 FRAME_NONE, // Frameless window. |
104 }; | 102 }; |
105 | 103 |
106 enum FullscreenType { | 104 enum FullscreenType { |
107 // Not fullscreen. | 105 // Not fullscreen. |
108 FULLSCREEN_TYPE_NONE = 0, | 106 FULLSCREEN_TYPE_NONE = 0, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 AppWindowContents* app_window_contents, | 226 AppWindowContents* app_window_contents, |
229 content::RenderFrameHost* creator_frame, | 227 content::RenderFrameHost* creator_frame, |
230 const CreateParams& params); | 228 const CreateParams& params); |
231 | 229 |
232 const std::string& window_key() const { return window_key_; } | 230 const std::string& window_key() const { return window_key_; } |
233 const SessionID& session_id() const { return session_id_; } | 231 const SessionID& session_id() const { return session_id_; } |
234 const std::string& extension_id() const { return extension_id_; } | 232 const std::string& extension_id() const { return extension_id_; } |
235 content::WebContents* web_contents() const; | 233 content::WebContents* web_contents() const; |
236 WindowType window_type() const { return window_type_; } | 234 WindowType window_type() const { return window_type_; } |
237 bool window_type_is_panel() const { | 235 bool window_type_is_panel() const { |
238 return (window_type_ == WINDOW_TYPE_PANEL || | 236 return window_type_ == WINDOW_TYPE_PANEL; |
239 window_type_ == WINDOW_TYPE_V1_PANEL); | |
240 } | 237 } |
241 content::BrowserContext* browser_context() const { return browser_context_; } | 238 content::BrowserContext* browser_context() const { return browser_context_; } |
242 const gfx::Image& app_icon() const { return app_icon_; } | 239 const gfx::Image& app_icon() const { return app_icon_; } |
243 const GURL& app_icon_url() const { return app_icon_url_; } | 240 const GURL& app_icon_url() const { return app_icon_url_; } |
244 const GURL& initial_url() const { return initial_url_; } | 241 const GURL& initial_url() const { return initial_url_; } |
245 bool is_hidden() const { return is_hidden_; } | 242 bool is_hidden() const { return is_hidden_; } |
246 | 243 |
247 const Extension* GetExtension() const; | 244 const Extension* GetExtension() const; |
248 NativeAppWindow* GetBaseWindow(); | 245 NativeAppWindow* GetBaseWindow(); |
249 gfx::NativeWindow GetNativeWindow(); | 246 gfx::NativeWindow GetNativeWindow(); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 base::Closure on_first_commit_callback_; | 574 base::Closure on_first_commit_callback_; |
578 | 575 |
579 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; | 576 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; |
580 | 577 |
581 DISALLOW_COPY_AND_ASSIGN(AppWindow); | 578 DISALLOW_COPY_AND_ASSIGN(AppWindow); |
582 }; | 579 }; |
583 | 580 |
584 } // namespace extensions | 581 } // namespace extensions |
585 | 582 |
586 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 583 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
OLD | NEW |