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

Unified Diff: content/renderer/dom_automation_controller.h

Issue 133403003: Don't try to send automation message after the corresponding RV is gone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | content/renderer/dom_automation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/dom_automation_controller.h
diff --git a/content/renderer/dom_automation_controller.h b/content/renderer/dom_automation_controller.h
index 8098b29b93d7180a842a7e84ea347bb0fdc0d425..829083ae4f07dc6ddab62cbcc3f389cd52c0ac52 100644
--- a/content/renderer/dom_automation_controller.h
+++ b/content/renderer/dom_automation_controller.h
@@ -6,6 +6,7 @@
#define CONTENT_RENDERER_DOM_AUTOMATION_CONTROLLER_H_
#include "base/basictypes.h"
+#include "content/public/renderer/render_view_observer.h"
#include "gin/wrappable.h"
/* DomAutomationController class:
@@ -80,17 +81,20 @@ class Arguments;
namespace content {
-class DomAutomationController : public gin::Wrappable<DomAutomationController> {
+class RenderViewImpl;
+
+class DomAutomationController : public gin::Wrappable<DomAutomationController>,
+ public RenderViewObserver {
public:
static gin::WrapperInfo kWrapperInfo;
- static void Install(blink::WebFrame* frame);
+ static void Install(RenderViewImpl* render_view, blink::WebFrame* frame);
// Makes the renderer send a javascript value to the app.
// The value to be sent can be either of type String,
// Number (double casted to int32) or Boolean. Any other type or no
// argument at all is ignored.
- bool Send(const gin::Arguments& args);
+ bool SendMsg(const gin::Arguments& args);
// Makes the renderer send a javascript value to the app.
// The value should be properly formed JSON.
@@ -102,14 +106,15 @@ class DomAutomationController : public gin::Wrappable<DomAutomationController> {
bool SetAutomationId(int automation_id);
private:
- explicit DomAutomationController(blink::WebFrame* frame);
+ explicit DomAutomationController(RenderViewImpl* render_view);
virtual ~DomAutomationController();
// gin::WrappableBase
virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) OVERRIDE;
- blink::WebFrame* frame_;
+ // RenderViewObserver
+ virtual void OnDestruct() OVERRIDE;
int automation_id_; // routing id to be used by the next channel.
« no previous file with comments | « no previous file | content/renderer/dom_automation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698