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

Side by Side Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h

Issue 11308012: Remove some TabContentses from extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/extensions/api/tabs/tabs.h" 11 #include "chrome/browser/extensions/api/tabs/tabs.h"
12 #include "chrome/browser/extensions/extension_function.h" 12 #include "chrome/browser/extensions/extension_function.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
16 16
17 // The offscreen tabs module depends on the tabs module so we can share 17 // The offscreen tabs module depends on the tabs module so we can share
18 // code between them. The long-term goal is to fold the offscreen tabs 18 // code between them. The long-term goal is to fold the offscreen tabs
19 // functionality into the tabs API. While these methods seem very similar to 19 // functionality into the tabs API. While these methods seem very similar to
20 // those in tabs, there are a few key differences that need to be resolved. 20 // those in tabs, there are a few key differences that need to be resolved.
21 // - Offscreen tabs are invisible (maybe this could be a property on Tab). 21 // - Offscreen tabs are invisible (maybe this could be a property on Tab).
22 // - The lifetime of an offscreen tab is tied to the parent tab that opened 22 // - The lifetime of an offscreen tab is tied to the parent tab that opened
23 // it. We do this to prevent leaking these tabs, since users wouldn't have 23 // it. We do this to prevent leaking these tabs, since users wouldn't have
24 // a way of directly closing them or knowing they're open. 24 // a way of directly closing them or knowing they're open.
25 // - Offscreen tabs have a width and height, while regular tabs don't. This 25 // - Offscreen tabs have a width and height, while regular tabs don't. This
26 // lets clients control the dimensions of the images in ToDataUrl. 26 // lets clients control the dimensions of the images in ToDataUrl.
27 27
28 class BackingStore; 28 class BackingStore;
29 class SkBitmap; 29 class SkBitmap;
30 class TabContents; 30
31 namespace content { 31 namespace content {
32 class WebContents; 32 class WebContents;
33 } // namespace content 33 }
34 34
35 // Creates an offscreen tab. 35 // Creates an offscreen tab.
36 class CreateOffscreenTabFunction : public SyncExtensionFunction { 36 class CreateOffscreenTabFunction : public SyncExtensionFunction {
37 public: 37 public:
38 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create") 38 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create")
39 39
40 CreateOffscreenTabFunction(); 40 CreateOffscreenTabFunction();
41 41
42 protected: 42 protected:
43 virtual ~CreateOffscreenTabFunction(); 43 virtual ~CreateOffscreenTabFunction();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 virtual bool RunImpl() OVERRIDE; 171 virtual bool RunImpl() OVERRIDE;
172 172
173 // UpdateTabFunction: 173 // UpdateTabFunction:
174 virtual void PopulateResult() OVERRIDE; 174 virtual void PopulateResult() OVERRIDE;
175 175
176 private: 176 private:
177 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction); 177 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction);
178 }; 178 };
179 179
180 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ 180 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698