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

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

Issue 2630753003: Separate validation failures from other failures in ExecuteCodeFunction. (Closed)
Patch Set: address comments Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { 227 class ExecuteCodeInTabFunction : public ExecuteCodeFunction {
228 public: 228 public:
229 ExecuteCodeInTabFunction(); 229 ExecuteCodeInTabFunction();
230 230
231 protected: 231 protected:
232 ~ExecuteCodeInTabFunction() override; 232 ~ExecuteCodeInTabFunction() override;
233 233
234 // ExtensionFunction: 234 // ExtensionFunction:
235 bool HasPermission() override; 235 bool HasPermission() override;
236 236
237 // Initialize the |execute_tab_id_| and |details_| if they haven't already 237 // Initializes |execute_tab_id_| and |details_|.
238 // been. Returns whether initialization was successful. 238 InitResult Init() override;
239 bool Init() override;
240 bool CanExecuteScriptOnPage() override; 239 bool CanExecuteScriptOnPage() override;
241 ScriptExecutor* GetScriptExecutor() override; 240 ScriptExecutor* GetScriptExecutor() override;
242 bool IsWebView() const override; 241 bool IsWebView() const override;
243 const GURL& GetWebViewSrc() const override; 242 const GURL& GetWebViewSrc() const override;
244 243
245 private: 244 private:
246 const ChromeExtensionFunctionDetails chrome_details_; 245 const ChromeExtensionFunctionDetails chrome_details_;
247 246
248 // Id of tab which executes code. 247 // Id of tab which executes code.
249 int execute_tab_id_; 248 int execute_tab_id_;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 331
333 // ExtensionFunction: 332 // ExtensionFunction:
334 ExtensionFunction::ResponseAction Run() override; 333 ExtensionFunction::ResponseAction Run() override;
335 334
336 DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction); 335 DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction);
337 }; 336 };
338 337
339 } // namespace extensions 338 } // namespace extensions
340 339
341 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ 340 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698