| 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_TABS_TABS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 }; | 59 }; |
| 60 class WindowsGetAllFunction : public SyncExtensionFunction { | 60 class WindowsGetAllFunction : public SyncExtensionFunction { |
| 61 virtual ~WindowsGetAllFunction() {} | 61 virtual ~WindowsGetAllFunction() {} |
| 62 virtual bool RunImpl() OVERRIDE; | 62 virtual bool RunImpl() OVERRIDE; |
| 63 DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL) | 63 DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL) |
| 64 }; | 64 }; |
| 65 class WindowsCreateFunction : public SyncExtensionFunction { | 65 class WindowsCreateFunction : public SyncExtensionFunction { |
| 66 virtual ~WindowsCreateFunction() {} | 66 virtual ~WindowsCreateFunction() {} |
| 67 virtual bool RunImpl() OVERRIDE; | 67 virtual bool RunImpl() OVERRIDE; |
| 68 // Returns whether the window should be created in incognito mode. | 68 // Returns whether the window should be created in incognito mode. |
| 69 // |create_data| are the options passed by the extension. It may be NULL. |
| 69 // |urls| is the list of urls to open. If we are creating an incognito window, | 70 // |urls| is the list of urls to open. If we are creating an incognito window, |
| 70 // the function will remove these urls which may not be opened in incognito | 71 // the function will remove these urls which may not be opened in incognito |
| 71 // mode. If window creation leads the browser into an erroneous state, | 72 // mode. If window creation leads the browser into an erroneous state, |
| 72 // |is_error| is set to true (also, error_ member variable is assigned | 73 // |is_error| is set to true (also, error_ member variable is assigned |
| 73 // the proper error message). | 74 // the proper error message). |
| 74 bool ShouldOpenIncognitoWindow(const base::DictionaryValue* args, | 75 bool ShouldOpenIncognitoWindow( |
| 75 std::vector<GURL>* urls, | 76 const api::windows::Create::Params::CreateData* create_data, |
| 76 bool* is_error); | 77 std::vector<GURL>* urls, |
| 78 bool* is_error); |
| 77 DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE) | 79 DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE) |
| 78 }; | 80 }; |
| 79 class WindowsUpdateFunction : public SyncExtensionFunction { | 81 class WindowsUpdateFunction : public SyncExtensionFunction { |
| 80 virtual ~WindowsUpdateFunction() {} | 82 virtual ~WindowsUpdateFunction() {} |
| 81 virtual bool RunImpl() OVERRIDE; | 83 virtual bool RunImpl() OVERRIDE; |
| 82 DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE) | 84 DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE) |
| 83 }; | 85 }; |
| 84 class WindowsRemoveFunction : public SyncExtensionFunction { | 86 class WindowsRemoveFunction : public SyncExtensionFunction { |
| 85 virtual ~WindowsRemoveFunction() {} | 87 virtual ~WindowsRemoveFunction() {} |
| 86 virtual bool RunImpl() OVERRIDE; | 88 virtual bool RunImpl() OVERRIDE; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 virtual ~TabsInsertCSSFunction() {} | 269 virtual ~TabsInsertCSSFunction() {} |
| 268 | 270 |
| 269 virtual bool ShouldInsertCSS() const OVERRIDE; | 271 virtual bool ShouldInsertCSS() const OVERRIDE; |
| 270 | 272 |
| 271 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) | 273 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) |
| 272 }; | 274 }; |
| 273 | 275 |
| 274 } // namespace extensions | 276 } // namespace extensions |
| 275 | 277 |
| 276 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 278 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| OLD | NEW |