Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: extensions/browser/app_window/app_window.h

Issue 2891043002: Revert of Remove WINDOW_TYPE_V1_PANEL AppWindow type (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
97 }; 99 };
98 100
99 enum Frame { 101 enum Frame {
100 FRAME_CHROME, // Chrome-style window frame. 102 FRAME_CHROME, // Chrome-style window frame.
101 FRAME_NONE, // Frameless window. 103 FRAME_NONE, // Frameless window.
102 }; 104 };
103 105
104 enum FullscreenType { 106 enum FullscreenType {
105 // Not fullscreen. 107 // Not fullscreen.
106 FULLSCREEN_TYPE_NONE = 0, 108 FULLSCREEN_TYPE_NONE = 0,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 AppWindowContents* app_window_contents, 228 AppWindowContents* app_window_contents,
227 content::RenderFrameHost* creator_frame, 229 content::RenderFrameHost* creator_frame,
228 const CreateParams& params); 230 const CreateParams& params);
229 231
230 const std::string& window_key() const { return window_key_; } 232 const std::string& window_key() const { return window_key_; }
231 const SessionID& session_id() const { return session_id_; } 233 const SessionID& session_id() const { return session_id_; }
232 const std::string& extension_id() const { return extension_id_; } 234 const std::string& extension_id() const { return extension_id_; }
233 content::WebContents* web_contents() const; 235 content::WebContents* web_contents() const;
234 WindowType window_type() const { return window_type_; } 236 WindowType window_type() const { return window_type_; }
235 bool window_type_is_panel() const { 237 bool window_type_is_panel() const {
236 return window_type_ == WINDOW_TYPE_PANEL; 238 return (window_type_ == WINDOW_TYPE_PANEL ||
239 window_type_ == WINDOW_TYPE_V1_PANEL);
237 } 240 }
238 content::BrowserContext* browser_context() const { return browser_context_; } 241 content::BrowserContext* browser_context() const { return browser_context_; }
239 const gfx::Image& app_icon() const { return app_icon_; } 242 const gfx::Image& app_icon() const { return app_icon_; }
240 const GURL& app_icon_url() const { return app_icon_url_; } 243 const GURL& app_icon_url() const { return app_icon_url_; }
241 const GURL& initial_url() const { return initial_url_; } 244 const GURL& initial_url() const { return initial_url_; }
242 bool is_hidden() const { return is_hidden_; } 245 bool is_hidden() const { return is_hidden_; }
243 246
244 const Extension* GetExtension() const; 247 const Extension* GetExtension() const;
245 NativeAppWindow* GetBaseWindow(); 248 NativeAppWindow* GetBaseWindow();
246 gfx::NativeWindow GetNativeWindow(); 249 gfx::NativeWindow GetNativeWindow();
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 base::Closure on_first_commit_callback_; 577 base::Closure on_first_commit_callback_;
575 578
576 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; 579 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_;
577 580
578 DISALLOW_COPY_AND_ASSIGN(AppWindow); 581 DISALLOW_COPY_AND_ASSIGN(AppWindow);
579 }; 582 };
580 583
581 } // namespace extensions 584 } // namespace extensions
582 585
583 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 586 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698