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

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

Issue 10535077: TabContentsWrapper -> TabContents, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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_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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 // - Offscreen tabs are invisible (maybe this could be a property on Tab). 22 // - Offscreen tabs are invisible (maybe this could be a property on Tab).
23 // - The lifetime of an offscreen tab is tied to the parent tab that opened 23 // - The lifetime of an offscreen tab is tied to the parent tab that opened
24 // it. We do this to prevent leaking these tabs, since users wouldn't have 24 // it. We do this to prevent leaking these tabs, since users wouldn't have
25 // a way of directly closing them or knowing they're open. 25 // a way of directly closing them or knowing they're open.
26 // - Offscreen tabs have a width and height, while regular tabs don't. This 26 // - Offscreen tabs have a width and height, while regular tabs don't. This
27 // lets clients control the dimensions of the images in ToDataUrl. 27 // lets clients control the dimensions of the images in ToDataUrl.
28 28
29 class BackingStore; 29 class BackingStore;
30 class SkBitmap; 30 class SkBitmap;
31 class TabContents; 31 class TabContents;
32 typedef TabContents TabContentsWrapper;
33 namespace content { 32 namespace content {
34 class WebContents; 33 class WebContents;
35 } // namespace content 34 } // namespace content
36 35
37 // Creates an offscreen tab. 36 // Creates an offscreen tab.
38 class CreateOffscreenTabFunction : public SyncExtensionFunction { 37 class CreateOffscreenTabFunction : public SyncExtensionFunction {
39 public: 38 public:
40 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create") 39 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create")
41 40
42 CreateOffscreenTabFunction(); 41 CreateOffscreenTabFunction();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // TODO(jstritar): Rename to toDataUrl. 146 // TODO(jstritar): Rename to toDataUrl.
148 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.toDataUrl") 147 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.toDataUrl")
149 148
150 ToDataUrlOffscreenTabFunction(); 149 ToDataUrlOffscreenTabFunction();
151 150
152 protected: 151 protected:
153 virtual ~ToDataUrlOffscreenTabFunction(); 152 virtual ~ToDataUrlOffscreenTabFunction();
154 153
155 // CaptureVisibleTabFunction: 154 // CaptureVisibleTabFunction:
156 virtual bool GetTabToCapture(content::WebContents** web_contents, 155 virtual bool GetTabToCapture(content::WebContents** web_contents,
157 TabContentsWrapper** wrapper) OVERRIDE; 156 TabContents** tab_contents) OVERRIDE;
158 157
159 private: 158 private:
160 DISALLOW_COPY_AND_ASSIGN(ToDataUrlOffscreenTabFunction); 159 DISALLOW_COPY_AND_ASSIGN(ToDataUrlOffscreenTabFunction);
161 }; 160 };
162 161
163 // Updates an offscreen tab. 162 // Updates an offscreen tab.
164 class UpdateOffscreenTabFunction : public UpdateTabFunction { 163 class UpdateOffscreenTabFunction : public UpdateTabFunction {
165 public: 164 public:
166 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.update") 165 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.update")
167 166
168 UpdateOffscreenTabFunction(); 167 UpdateOffscreenTabFunction();
169 168
170 protected: 169 protected:
171 virtual ~UpdateOffscreenTabFunction(); 170 virtual ~UpdateOffscreenTabFunction();
172 171
173 // ExtensionFunction: 172 // ExtensionFunction:
174 virtual bool RunImpl() OVERRIDE; 173 virtual bool RunImpl() OVERRIDE;
175 174
176 // UpdateTabFunction: 175 // UpdateTabFunction:
177 virtual void PopulateResult() OVERRIDE; 176 virtual void PopulateResult() OVERRIDE;
178 177
179 private: 178 private:
180 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction); 179 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction);
181 }; 180 };
182 181
183 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ 182 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698