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

Side by Side Diff: extensions/browser/api/execute_code_function.h

Issue 1056533002: Implement <webview>.addContentScript/removeContentScript API [2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webview_addremove_contentscripts_2
Patch Set: Another round of comments. Created 5 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 EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ 5 #ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_
6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ 6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_
7 7
8 #include "extensions/browser/extension_function.h" 8 #include "extensions/browser/extension_function.h"
9 #include "extensions/browser/script_executor.h" 9 #include "extensions/browser/script_executor.h"
10 #include "extensions/common/api/extension_types.h" 10 #include "extensions/common/api/extension_types.h"
(...skipping 22 matching lines...) Expand all
33 virtual ScriptExecutor* GetScriptExecutor() = 0; 33 virtual ScriptExecutor* GetScriptExecutor() = 0;
34 virtual bool IsWebView() const = 0; 34 virtual bool IsWebView() const = 0;
35 virtual const GURL& GetWebViewSrc() const = 0; 35 virtual const GURL& GetWebViewSrc() const = 0;
36 virtual void OnExecuteCodeFinished(const std::string& error, 36 virtual void OnExecuteCodeFinished(const std::string& error,
37 const GURL& on_url, 37 const GURL& on_url,
38 const base::ListValue& result); 38 const base::ListValue& result);
39 39
40 virtual bool LoadFile(const std::string& file); 40 virtual bool LoadFile(const std::string& file);
41 41
42 // Called when contents from the loaded file have been localized. 42 // Called when contents from the loaded file have been localized.
43 void DidLoadAndLocalizeFile(const std::string& file, 43 virtual void DidLoadAndLocalizeFile(const std::string& file,
44 bool success, 44 bool success,
45 const std::string& data); 45 const std::string& data);
46 46
47 const HostID& host_id() const { return host_id_; } 47 const HostID& host_id() const { return host_id_; }
48 void set_host_id(HostID host_id) { 48 void set_host_id(HostID host_id) {
49 host_id_ = host_id; 49 host_id_ = host_id;
50 } 50 }
51 51
52 // The injection details. 52 // The injection details.
53 scoped_ptr<core_api::extension_types::InjectDetails> details_; 53 scoped_ptr<core_api::extension_types::InjectDetails> details_;
54 54
55 private: 55 private:
(...skipping 20 matching lines...) Expand all
76 // The URL of the file being injected into the page. 76 // The URL of the file being injected into the page.
77 GURL file_url_; 77 GURL file_url_;
78 78
79 // The ID of the injection host. 79 // The ID of the injection host.
80 HostID host_id_; 80 HostID host_id_;
81 }; 81 };
82 82
83 } // namespace extensions 83 } // namespace extensions
84 84
85 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ 85 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698