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

Unified Diff: content/browser/renderer_host/render_view_host.h

Issue 8124024: Applescript: return value from execute javascript command (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed issues Created 9 years, 2 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: content/browser/renderer_host/render_view_host.h
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 89473915ca3e233b6ac096d70becee3d0677438c..8bc526aaf8c3159b27c12a139d57c9d784810b78 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -25,6 +25,9 @@
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/window_open_disposition.h"
+#include "base/values.h"
+#include "content/common/notification_observer.h"
+
class ChildProcessSecurityPolicy;
struct DesktopNotificationHostMsg_Show_Params;
class FilePath;
@@ -72,6 +75,27 @@ namespace net {
class URLRequestContextGetter;
}
+// NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT
+// notifications.
+class ExecuteNotificationObserver : public NotificationObserver {
+ public:
+ ExecuteNotificationObserver(int id);
Avi (use Gerrit) 2011/10/17 14:20:38 one param constructors should be "explicit"
keishi 2011/10/21 05:05:43 Done.
+ virtual ~ExecuteNotificationObserver();
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ int id() const { return id_; }
+
+ Value* value() const { return value_.get(); }
+
+ private:
+ int id_;
+ scoped_ptr<Value> value_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExecuteNotificationObserver);
+};
+
//
// RenderViewHost
//
@@ -258,6 +282,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath,
const string16& jscript);
+ Value* ExecuteJavascriptAndGetValue(const string16& frame_xpath,
+ const string16& jscript);
Avi (use Gerrit) 2011/10/17 14:20:38 align params, add comment; do we want to merge thi
keishi 2011/10/21 05:05:43 Do you want me to add an argument to ExecuteJavasc
Avi (use Gerrit) 2011/10/21 11:50:48 hmmmm... What fraction of the users bother to set
+
+
// Notifies the RenderView that the JavaScript message that was shown was
// closed by the user.
void JavaScriptDialogClosed(IPC::Message* reply_msg,

Powered by Google App Engine
This is Rietveld 408576698