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

Unified 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 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h
diff --git a/chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h b/chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c0330bb10c59a3f1e2b57e1ea9b5c96a5365427
--- /dev/null
+++ b/chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
+#define CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
+
+#include "content/public/browser/browser_plugin/browser_plugin_guest_observer.h"
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/script_executor.h"
+
+namespace base {
+class ListValue;
+} // namespace base
+
+namespace extensions {
+class Extension;
+} // namespace extensions
+
+class ChromeBrowserPluginGuestObserver
+ : public content::BrowserPluginGuestObserver,
+ public base::RefCounted<ChromeBrowserPluginGuestObserver> {
+ public:
+ explicit ChromeBrowserPluginGuestObserver(content::BrowserPluginGuest* guest);
+
+ virtual bool OnMessageReceivedFromEmbedder(
+ const IPC::Message& message) OVERRIDE;
+
+ private:
+ friend class base::RefCounted<ChromeBrowserPluginGuestObserver>;
+
+ virtual ~ChromeBrowserPluginGuestObserver();
+
+ virtual void OnDestruct() OVERRIDE;
+
+ // Message handlers.
+ void OnExecuteScript(int instance_id,
+ int request_id,
+ const base::ListValue& list);
+ void OnExecuteCodeFinished(int request_id,
+ const std::string& error,
+ int32 on_page_id,
+ const GURL& on_url,
+ const base::ListValue& script_result);
+
+ ObserverList<extensions::TabHelper::ScriptExecutionObserver>
+ script_observers_;
+ scoped_ptr<extensions::ScriptExecutor> script_executor_;
+ scoped_refptr<extensions::Extension> extension_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPluginGuestObserver);
+};
+
+#endif // CHROME_BROWSER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_GUEST_OBSERVER_H_
« 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