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

Side by Side Diff: chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h

Issue 11693009: Browser Plugin: Implement ExecuteScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
6 #define CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
7
8 #include "content/public/browser/browser_plugin/browser_plugin_guest_observer.h"
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/extensions/script_executor.h"
13
14 namespace base {
15 class ListValue;
16 } // namespace base
17
18 namespace extensions {
19 class Extension;
20 } // namespace extensions
21
22 class ChromeBrowserPluginGuestObserver
23 : public content::BrowserPluginGuestObserver,
24 public base::RefCounted<ChromeBrowserPluginGuestObserver> {
25 public:
26 explicit ChromeBrowserPluginGuestObserver(content::BrowserPluginGuest* guest);
27
28 virtual bool OnMessageReceivedFromEmbedder(
29 const IPC::Message& message) OVERRIDE;
30
31 private:
32 friend class base::RefCounted<ChromeBrowserPluginGuestObserver>;
33
34 virtual ~ChromeBrowserPluginGuestObserver();
35
36 virtual void OnDestruct() OVERRIDE;
37
38 // Message handlers.
39 void OnExecuteScript(int instance_id,
40 int request_id,
41 const base::ListValue& list);
42 void OnExecuteCodeFinished(int request_id,
43 const std::string& error,
44 int32 on_page_id,
45 const GURL& on_url,
46 const base::ListValue& script_result);
47
48 ObserverList<extensions::TabHelper::ScriptExecutionObserver>
49 script_observers_;
50 scoped_ptr<extensions::ScriptExecutor> script_executor_;
51 scoped_refptr<extensions::Extension> extension_;
52
53 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPluginGuestObserver);
54 };
55
56 #endif // CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698