diff options
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r-- | chrome/renderer/render_view.h | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index c69a601..60bf6cb 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -16,6 +16,7 @@ #include "base/gfx/point.h" #include "base/gfx/rect.h" #include "base/id_map.h" +#include "base/linked_ptr.h" #include "base/shared_memory.h" #include "base/timer.h" #include "base/values.h" @@ -25,6 +26,7 @@ #include "chrome/common/navigation_gesture.h" #include "chrome/common/notification_type.h" #include "chrome/common/page_zoom.h" +#include "chrome/common/render_messages.h" #include "chrome/common/renderer_preferences.h" #include "chrome/common/view_types.h" #include "chrome/renderer/automation/dom_automation_controller.h" @@ -611,17 +613,9 @@ class RenderView : public RenderWidget, const WebKit::WebMediaPlayerAction& action); void OnNotifyRendererViewType(ViewType::Type view_type); void OnUpdateBrowserWindowId(int window_id); - void OnExecuteCode(int request_id, - const std::string& extension_id, - bool is_js_code, - const std::string& code_string, - bool all_frames); + void OnExecuteCode(const ViewMsg_ExecuteCode_Params& params); void ExecuteCodeImpl(WebKit::WebFrame* frame, - int request_id, - const std::string& extension_id, - bool is_js_code, - const std::string& code_string, - bool all_frames); + const ViewMsg_ExecuteCode_Params& params); void OnUpdateBackForwardListCount(int back_list_count, int forward_list_count); void OnGetAccessibilityInfo( @@ -961,34 +955,8 @@ class RenderView : public RenderWidget, // Id number of browser window which RenderView is attached to. int browser_window_id_; - // If page is loading, we can't run code, just create CodeExecutionInfo - // objects store pending execution information and delay the execution until - // page is loaded. - struct CodeExecutionInfo : public base::RefCounted<CodeExecutionInfo> { - CodeExecutionInfo(int id_of_request, const std::string& id_of_extension, - bool is_js, const std::string& code, - bool inject_to_all_frames) - : request_id(id_of_request), - extension_id(id_of_extension), - code_string(code), - is_js_code(is_js), - all_frames(inject_to_all_frames) {} - int request_id; - - // The id of extension who issues the pending executeScript API call. - std::string extension_id; - - // The code which would be executed. - std::string code_string; - - // It's true if |code_string| is JavaScript; otherwise |code_string| is - // CSS text. - bool is_js_code; - // It's true if the code_string would be injected into all frames. - bool all_frames; - }; - - std::queue<scoped_refptr<CodeExecutionInfo> > pending_code_execution_queue_; + std::queue<linked_ptr<ViewMsg_ExecuteCode_Params> > + pending_code_execution_queue_; // page id for the last navigation sent to the browser. int32 last_top_level_navigation_page_id_; |