| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 // those in tabs, there are a few key differences that need to be resolved. | 21 // those in tabs, there are a few key differences that need to be resolved. |
| 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 TabContentsWrapper; | 31 class TabContents; |
| 32 typedef TabContents TabContentsWrapper; |
| 32 namespace content { | 33 namespace content { |
| 33 class WebContents; | 34 class WebContents; |
| 34 } // namespace content | 35 } // namespace content |
| 35 | 36 |
| 36 // Creates an offscreen tab. | 37 // Creates an offscreen tab. |
| 37 class CreateOffscreenTabFunction : public SyncExtensionFunction { | 38 class CreateOffscreenTabFunction : public SyncExtensionFunction { |
| 38 public: | 39 public: |
| 39 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create") | 40 DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create") |
| 40 | 41 |
| 41 CreateOffscreenTabFunction(); | 42 CreateOffscreenTabFunction(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 virtual bool RunImpl() OVERRIDE; | 174 virtual bool RunImpl() OVERRIDE; |
| 174 | 175 |
| 175 // UpdateTabFunction: | 176 // UpdateTabFunction: |
| 176 virtual void PopulateResult() OVERRIDE; | 177 virtual void PopulateResult() OVERRIDE; |
| 177 | 178 |
| 178 private: | 179 private: |
| 179 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction); | 180 DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction); |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ | 183 #endif // CHROME_BROWSER_EXTENSIONS_API_OFFSCREEN_TABS_OFFSCREEN_TABS_API_H_ |
| OLD | NEW |