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

Unified Diff: chrome/renderer/extensions/chrome_v8_context.h

Issue 12567028: Apps V2 in Pepper: Host side implementation of ExntensionsCommon - Part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/chrome_v8_context.h
diff --git a/chrome/renderer/extensions/chrome_v8_context.h b/chrome/renderer/extensions/chrome_v8_context.h
index 323ce77695308eb1dc3f24d9e995fcd2dda7d8e4..8b07a4535fe010810905f85d140bcf53a2521e64 100644
--- a/chrome/renderer/extensions/chrome_v8_context.h
+++ b/chrome/renderer/extensions/chrome_v8_context.h
@@ -8,8 +8,10 @@
#include <string>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "chrome/common/extensions/features/feature.h"
#include "chrome/renderer/extensions/module_system.h"
+#include "chrome/renderer/extensions/request_sender.h"
#include "chrome/renderer/extensions/scoped_persistent.h"
#include "v8/include/v8.h"
@@ -29,13 +31,13 @@ class Extension;
// TODO(aa): Consider converting this back to a set of bindings_utils. It would
// require adding WebFrame::GetIsolatedWorldIdByV8Context() to WebCore, but then
// we won't need this object and it's a bit less state to keep track of.
-class ChromeV8Context {
+class ChromeV8Context : public RequestSender::Source {
public:
ChromeV8Context(v8::Handle<v8::Context> context,
WebKit::WebFrame* frame,
const Extension* extension,
Feature::Context context_type);
- ~ChromeV8Context();
+ virtual ~ChromeV8Context();
// Clears the WebFrame for this contexts and invalidates the associated
// ModuleSystem.
@@ -104,6 +106,14 @@ class ChromeV8Context {
// Returns a string description of the type of context this is.
std::string GetContextTypeDescription();
+ // RequestSender::Source implementation.
+ virtual ChromeV8Context* GetContext() OVERRIDE;
+ virtual void OnResponseReceived(const std::string& name,
+ int request_id,
+ bool success,
+ const base::ListValue& response,
+ const std::string& error) OVERRIDE;
+
private:
// The v8 context the bindings are accessible to.
ScopedPersistent<v8::Context> v8_context_;
« no previous file with comments | « no previous file | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | chrome/renderer/extensions/request_sender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698