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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.h

Issue 11222003: Remove TabContents creation from ShellWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const fix Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
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"
11 #include "chrome/browser/extensions/image_loading_tracker.h" 11 #include "chrome/browser/extensions/image_loading_tracker.h"
12 #include "chrome/browser/sessions/session_id.h" 12 #include "chrome/browser/sessions/session_id.h"
13 #include "chrome/browser/ui/base_window.h" 13 #include "chrome/browser/ui/base_window.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 #include "content/public/browser/web_contents_delegate.h" 16 #include "content/public/browser/web_contents_delegate.h"
17 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
18 #include "content/public/common/console_message_level.h" 18 #include "content/public/common/console_message_level.h"
19 #include "ui/gfx/image/image.h" 19 #include "ui/gfx/image/image.h"
20 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
21 21
22 class GURL; 22 class GURL;
23 class Profile; 23 class Profile;
24 class TabContents;
25 class NativeShellWindow; 24 class NativeShellWindow;
26 25
27 namespace content { 26 namespace content {
28 class WebContents; 27 class WebContents;
29 } 28 }
30 29
31 namespace extensions { 30 namespace extensions {
32 class Extension; 31 class Extension;
33 class PlatformAppBrowserTest; 32 class PlatformAppBrowserTest;
34 class WindowController; 33 class WindowController;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const CreateParams& params); 76 const CreateParams& params);
78 77
79 // Convert draggable regions in raw format to SkRegion format. Caller is 78 // Convert draggable regions in raw format to SkRegion format. Caller is
80 // responsible for deleting the returned SkRegion instance. 79 // responsible for deleting the returned SkRegion instance.
81 static SkRegion* RawDraggableRegionsToSkRegion( 80 static SkRegion* RawDraggableRegionsToSkRegion(
82 const std::vector<extensions::DraggableRegion>& regions); 81 const std::vector<extensions::DraggableRegion>& regions);
83 82
84 const std::string& window_key() const { return window_key_; } 83 const std::string& window_key() const { return window_key_; }
85 const SessionID& session_id() const { return session_id_; } 84 const SessionID& session_id() const { return session_id_; }
86 const extensions::Extension* extension() const { return extension_; } 85 const extensions::Extension* extension() const { return extension_; }
87 TabContents* tab_contents() const { return contents_.get(); } 86 content::WebContents* web_contents() const { return web_contents_.get(); }
88 content::WebContents* web_contents() const { return web_contents_; }
89 Profile* profile() const { return profile_; } 87 Profile* profile() const { return profile_; }
90 const gfx::Image& app_icon() const { return app_icon_; } 88 const gfx::Image& app_icon() const { return app_icon_; }
91 89
92 BaseWindow* GetBaseWindow(); 90 BaseWindow* GetBaseWindow();
93 gfx::NativeWindow GetNativeWindow() { 91 gfx::NativeWindow GetNativeWindow() {
94 return GetBaseWindow()->GetNativeWindow(); 92 return GetBaseWindow()->GetNativeWindow();
95 } 93 }
96 94
97 // NativeShellWindows should call this to determine what the window's title 95 // NativeShellWindows should call this to determine what the window's title
98 // is on startup and from within UpdateWindowTitle(). 96 // is on startup and from within UpdateWindowTitle().
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 188
191 Profile* profile_; // weak pointer - owned by ProfileManager. 189 Profile* profile_; // weak pointer - owned by ProfileManager.
192 // weak pointer - owned by ExtensionService. 190 // weak pointer - owned by ExtensionService.
193 const extensions::Extension* extension_; 191 const extensions::Extension* extension_;
194 192
195 // Identifier that is used when saving and restoring geometry for this 193 // Identifier that is used when saving and restoring geometry for this
196 // window. 194 // window.
197 std::string window_key_; 195 std::string window_key_;
198 196
199 const SessionID session_id_; 197 const SessionID session_id_;
200 scoped_ptr<TabContents> contents_; 198 scoped_ptr<content::WebContents> web_contents_;
201 // web_contents_ is owned by contents_.
202 content::WebContents* web_contents_;
203 content::NotificationRegistrar registrar_; 199 content::NotificationRegistrar registrar_;
204 ExtensionFunctionDispatcher extension_function_dispatcher_; 200 ExtensionFunctionDispatcher extension_function_dispatcher_;
205 201
206 // Icon showed in the task bar. 202 // Icon showed in the task bar.
207 gfx::Image app_icon_; 203 gfx::Image app_icon_;
208 204
209 // Used for loading app_icon_. 205 // Used for loading app_icon_.
210 scoped_ptr<ImageLoadingTracker> app_icon_loader_; 206 scoped_ptr<ImageLoadingTracker> app_icon_loader_;
211 207
212 scoped_ptr<NativeShellWindow> native_window_; 208 scoped_ptr<NativeShellWindow> native_window_;
213 209
214 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 210 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
215 }; 211 };
216 212
217 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 213 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.cc » ('j') | chrome/browser/ui/extensions/shell_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698