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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.h

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 protected: 147 protected:
148 ~TabsUpdateFunction() override {} 148 ~TabsUpdateFunction() override {}
149 virtual bool UpdateURL(const std::string& url, 149 virtual bool UpdateURL(const std::string& url,
150 int tab_id, 150 int tab_id,
151 bool* is_async); 151 bool* is_async);
152 virtual void PopulateResult(); 152 virtual void PopulateResult();
153 153
154 content::WebContents* web_contents_; 154 content::WebContents* web_contents_;
155 155
156 private: 156 private:
157 void AfterFakeAsyncDelay();
157 bool RunAsync() override; 158 bool RunAsync() override;
158 void OnExecuteCodeFinished(const std::string& error, 159 void OnExecuteCodeFinished(const std::string& error,
159 const GURL& on_url, 160 const GURL& on_url,
160 const base::ListValue& script_result); 161 const base::ListValue& script_result);
161 162
162 DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) 163 DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE)
163 }; 164 };
164 class TabsMoveFunction : public ChromeSyncExtensionFunction { 165 class TabsMoveFunction : public ChromeSyncExtensionFunction {
165 ~TabsMoveFunction() override {} 166 ~TabsMoveFunction() override {}
166 bool RunSync() override; 167 bool RunSync() override;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ~TabsGetZoomSettingsFunction() override {} 319 ~TabsGetZoomSettingsFunction() override {}
319 320
320 bool RunAsync() override; 321 bool RunAsync() override;
321 322
322 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) 323 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS)
323 }; 324 };
324 325
325 } // namespace extensions 326 } // namespace extensions
326 327
327 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ 328 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698