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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.h

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // plugin processes know to pump messages. An existing event can be passed 85 // plugin processes know to pump messages. An existing event can be passed
86 // in, otherwise if it's NULL a new event will be created. 86 // in, otherwise if it's NULL a new event will be created.
87 explicit RenderViewHost(SiteInstance* instance, 87 explicit RenderViewHost(SiteInstance* instance,
88 RenderViewHostDelegate* delegate, 88 RenderViewHostDelegate* delegate,
89 int routing_id, 89 int routing_id,
90 base::WaitableEvent* modal_dialog_event); 90 base::WaitableEvent* modal_dialog_event);
91 virtual ~RenderViewHost(); 91 virtual ~RenderViewHost();
92 92
93 SiteInstance* site_instance() const { return instance_; } 93 SiteInstance* site_instance() const { return instance_; }
94 RenderViewHostDelegate* delegate() const { return delegate_; } 94 RenderViewHostDelegate* delegate() const { return delegate_; }
95 ExtensionFunctionDispatcher* extension_function_dispatcher() const {
96 return extension_function_dispatcher_.get();
97 }
98 95
99 // Set up the RenderView child process. Virtual because it is overridden by 96 // Set up the RenderView child process. Virtual because it is overridden by
100 // TestRenderViewHost. 97 // TestRenderViewHost.
101 virtual bool CreateRenderView(); 98 virtual bool CreateRenderView();
102 99
103 // Returns true if the RenderView is active and has not crashed. Virtual 100 // Returns true if the RenderView is active and has not crashed. Virtual
104 // because it is overridden by TestRenderViewHost. 101 // because it is overridden by TestRenderViewHost.
105 virtual bool IsRenderViewLive() const; 102 virtual bool IsRenderViewLive() const;
106 103
107 void SetRendererPrefs(const RendererPreferences& renderer_prefs); 104 void SetRendererPrefs(const RendererPreferences& renderer_prefs);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 296
300 // Notifies the renderer that a drag and drop operation is in progress, with 297 // Notifies the renderer that a drag and drop operation is in progress, with
301 // droppable items positioned over the renderer's view. 298 // droppable items positioned over the renderer's view.
302 void DragSourceMovedTo( 299 void DragSourceMovedTo(
303 int client_x, int client_y, int screen_x, int screen_y); 300 int client_x, int client_y, int screen_x, int screen_y);
304 301
305 // Notifies the renderer that we're done with the drag and drop operation. 302 // Notifies the renderer that we're done with the drag and drop operation.
306 // This allows the renderer to reset some state. 303 // This allows the renderer to reset some state.
307 void DragSourceSystemDragEnded(); 304 void DragSourceSystemDragEnded();
308 305
309 // Tell the render view to expose DOM automation bindings so that the js 306 // Tell the render view to enable a set of javascript bindings. The argument
310 // content can send JSON-encoded data back to automation in the parent 307 // should be a combination of values from BindingsPolicy.
311 // process. 308 void AllowBindings(int binding_flags);
312 // Must be called before CreateRenderView().
313 void AllowDomAutomationBindings();
314
315 // Tell the render view to allow the javascript access to
316 // the external host via automation.
317 // Must be called before CreateRenderView().
318 void AllowExternalHostBindings();
319
320 // Tell the render view to expose DOM bindings so that the JS content
321 // can send JSON-encoded data back to the browser process.
322 // This is used for HTML-based UI.
323 // Must be called before CreateRenderView().
324 void AllowDOMUIBindings();
325
326 // Tell the render view to expose privileged bindings for use by extensions.
327 // Must be called before CreateRenderView().
328 void AllowExtensionBindings();
329 309
330 // Sets a property with the given name and value on the DOM UI binding object. 310 // Sets a property with the given name and value on the DOM UI binding object.
331 // Must call AllowDOMUIBindings() on this renderer first. 311 // Must call AllowDOMUIBindings() on this renderer first.
332 void SetDOMUIProperty(const std::string& name, const std::string& value); 312 void SetDOMUIProperty(const std::string& name, const std::string& value);
333 313
334 // Tells the renderer view to focus the first (last if reverse is true) node. 314 // Tells the renderer view to focus the first (last if reverse is true) node.
335 void SetInitialFocus(bool reverse); 315 void SetInitialFocus(bool reverse);
336 316
337 // Clears the node that is currently focused (if any). 317 // Clears the node that is currently focused (if any).
338 void ClearFocusedNode(); 318 void ClearFocusedNode();
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 scoped_ptr<ViewMsg_Navigate> suspended_nav_message_; 577 scoped_ptr<ViewMsg_Navigate> suspended_nav_message_;
598 578
599 // If we were asked to RunModal, then this will hold the reply_msg that we 579 // If we were asked to RunModal, then this will hold the reply_msg that we
600 // must return to the renderer to unblock it. 580 // must return to the renderer to unblock it.
601 IPC::Message* run_modal_reply_msg_; 581 IPC::Message* run_modal_reply_msg_;
602 582
603 bool is_waiting_for_unload_ack_; 583 bool is_waiting_for_unload_ack_;
604 584
605 bool are_javascript_messages_suppressed_; 585 bool are_javascript_messages_suppressed_;
606 586
607 // Handles processing IPC messages request extension functions be executed.
608 // This changes during navigation and may be NULL if the current content is
609 // not an extension.
610 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
611
612 // True if the render view can be shut down suddenly. 587 // True if the render view can be shut down suddenly.
613 bool sudden_termination_allowed_; 588 bool sudden_termination_allowed_;
614 589
615 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); 590 DISALLOW_COPY_AND_ASSIGN(RenderViewHost);
616 }; 591 };
617 592
618 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 593 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698