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

Side by Side Diff: chrome/browser/extensions/api/webview/webview_api.h

Issue 226043005: Fix webview.executeScript API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_WEBVIEW_WEBVIEW_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_
7 7
8 #include "chrome/browser/extensions/api/capture_web_contents_function.h" 8 #include "chrome/browser/extensions/api/capture_web_contents_function.h"
9 #include "chrome/browser/extensions/api/execute_code_function.h" 9 #include "chrome/browser/extensions/api/execute_code_function.h"
10 #include "chrome/browser/guestview/webview/webview_find_helper.h" 10 #include "chrome/browser/guestview/webview/webview_find_helper.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 protected: 131 protected:
132 virtual ~WebviewExecuteCodeFunction(); 132 virtual ~WebviewExecuteCodeFunction();
133 133
134 // Initialize |details_| if it hasn't already been. 134 // Initialize |details_| if it hasn't already been.
135 virtual bool Init() OVERRIDE; 135 virtual bool Init() OVERRIDE;
136 virtual bool ShouldInsertCSS() const OVERRIDE; 136 virtual bool ShouldInsertCSS() const OVERRIDE;
137 virtual bool CanExecuteScriptOnPage() OVERRIDE; 137 virtual bool CanExecuteScriptOnPage() OVERRIDE;
138 // Guarded by a process ID check. 138 // Guarded by a process ID check.
139 virtual extensions::ScriptExecutor* GetScriptExecutor() OVERRIDE FINAL; 139 virtual extensions::ScriptExecutor* GetScriptExecutor() OVERRIDE FINAL;
140 virtual bool IsWebView() const OVERRIDE; 140 virtual bool IsWebView() const OVERRIDE;
141 virtual std::string GetWebViewSrc() const OVERRIDE;
141 142
142 private: 143 private:
143 // Contains extension resource built from path of file which is 144 // Contains extension resource built from path of file which is
144 // specified in JSON arguments. 145 // specified in JSON arguments.
145 extensions::ExtensionResource resource_; 146 extensions::ExtensionResource resource_;
146 147
147 int guest_instance_id_; 148 int guest_instance_id_;
148 149
150 std::string guest_src_;
151
149 DISALLOW_COPY_AND_ASSIGN(WebviewExecuteCodeFunction); 152 DISALLOW_COPY_AND_ASSIGN(WebviewExecuteCodeFunction);
150 }; 153 };
151 154
152 class WebviewExecuteScriptFunction : public WebviewExecuteCodeFunction { 155 class WebviewExecuteScriptFunction : public WebviewExecuteCodeFunction {
153 public: 156 public:
154 WebviewExecuteScriptFunction(); 157 WebviewExecuteScriptFunction();
155 158
156 protected: 159 protected:
157 virtual ~WebviewExecuteScriptFunction() {} 160 virtual ~WebviewExecuteScriptFunction() {}
158 161
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 private: 362 private:
360 // WebviewExtensionFunction implementation. 363 // WebviewExtensionFunction implementation.
361 virtual bool RunImplSafe(WebViewGuest* guest) OVERRIDE; 364 virtual bool RunImplSafe(WebViewGuest* guest) OVERRIDE;
362 365
363 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction); 366 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction);
364 }; 367 };
365 368
366 } // namespace extensions 369 } // namespace extensions
367 370
368 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ 371 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698