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

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

Issue 21540: Add developer tools message forwarding to browser (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Tell the render view to allow the javascript access to 313 // Tell the render view to allow the javascript access to
314 // the external host via automation. 314 // the external host via automation.
315 void AllowExternalHostBindings(); 315 void AllowExternalHostBindings();
316 316
317 // Tell the render view to expose DOM bindings so that the JS content 317 // Tell the render view to expose DOM bindings so that the JS content
318 // can send JSON-encoded data back to the browser process. 318 // can send JSON-encoded data back to the browser process.
319 // This is used for HTML-based UI. 319 // This is used for HTML-based UI.
320 // Must be called before CreateRenderView(). 320 // Must be called before CreateRenderView().
321 void AllowDOMUIBindings(); 321 void AllowDOMUIBindings();
322 322
323 // Tells the renderer which render view should be inspected by developer
324 // tools loaded in it. This method should be called before renderer is
325 // created.
326 void SetInspectedView(int inspected_process_id, int inspected_view_id);
327
323 // Sets a property with the given name and value on the DOM UI binding object. 328 // Sets a property with the given name and value on the DOM UI binding object.
324 // Must call AllowDOMUIBindings() on this renderer first. 329 // Must call AllowDOMUIBindings() on this renderer first.
325 void SetDOMUIProperty(const std::string& name, const std::string& value); 330 void SetDOMUIProperty(const std::string& name, const std::string& value);
326 331
327 // Fill in a ViewMsg_Navigate_Params struct from a NavigationEntry. 332 // Fill in a ViewMsg_Navigate_Params struct from a NavigationEntry.
328 static void MakeNavigateParams(const NavigationEntry& entry, 333 static void MakeNavigateParams(const NavigationEntry& entry,
329 bool reload, 334 bool reload,
330 ViewMsg_Navigate_Params* params); 335 ViewMsg_Navigate_Params* params);
331 336
332 // Tells the renderer view to focus the first (last if reverse is true) node. 337 // Tells the renderer view to focus the first (last if reverse is true) node.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 void OnTakeFocus(bool reverse); 507 void OnTakeFocus(bool reverse);
503 void OnMsgPageHasOSDD(int32 page_id, const GURL& doc_url, bool autodetected); 508 void OnMsgPageHasOSDD(int32 page_id, const GURL& doc_url, bool autodetected);
504 void OnMsgInspectElementReply(int num_resources); 509 void OnMsgInspectElementReply(int num_resources);
505 void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params); 510 void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params);
506 void OnDebugMessage(const std::string& message); 511 void OnDebugMessage(const std::string& message);
507 void OnAddMessageToConsole(const std::wstring& message, 512 void OnAddMessageToConsole(const std::wstring& message,
508 int32 line_no, 513 int32 line_no,
509 const std::wstring& source_id); 514 const std::wstring& source_id);
510 void OnDebuggerOutput(const std::wstring& output); 515 void OnDebuggerOutput(const std::wstring& output);
511 void DidDebugAttach(); 516 void DidDebugAttach();
517 void OnForwardToDevToolsAgent(const IPC::Message& message);
518 void OnForwardToDevToolsClient(const IPC::Message& message);
512 void OnUserMetricsRecordAction(const std::wstring& action); 519 void OnUserMetricsRecordAction(const std::wstring& action);
513 void OnMissingPluginStatus(int status); 520 void OnMissingPluginStatus(int status);
514 void OnMessageReceived(IPC::Message* msg) { } 521 void OnMessageReceived(IPC::Message* msg) { }
515 522
516 void OnReceivedSavableResourceLinksForCurrentPage( 523 void OnReceivedSavableResourceLinksForCurrentPage(
517 const std::vector<GURL>& resources_list, 524 const std::vector<GURL>& resources_list,
518 const std::vector<GURL>& referrers_list, 525 const std::vector<GURL>& referrers_list,
519 const std::vector<GURL>& frames_list); 526 const std::vector<GURL>& frames_list);
520 527
521 void OnReceivedSerializedHtmlData(const GURL& frame_url, 528 void OnReceivedSerializedHtmlData(const GURL& frame_url,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // If we were asked to RunModal, then this will hold the reply_msg that we 613 // If we were asked to RunModal, then this will hold the reply_msg that we
607 // must return to the renderer to unblock it. 614 // must return to the renderer to unblock it.
608 IPC::Message* run_modal_reply_msg_; 615 IPC::Message* run_modal_reply_msg_;
609 616
610 bool has_unload_listener_; 617 bool has_unload_listener_;
611 618
612 bool is_waiting_for_unload_ack_; 619 bool is_waiting_for_unload_ack_;
613 620
614 bool are_javascript_messages_suppressed_; 621 bool are_javascript_messages_suppressed_;
615 622
623 // When this renderer hosts developer tools this two fields contain rerndeder
624 // process id and render view id of the page being inspected. Both fieldes
625 // are -1 if the content of this renderer is not developer tools frontend.
626 int inspected_process_id_;
627 int inspected_view_id_;
628
616 DISALLOW_EVIL_CONSTRUCTORS(RenderViewHost); 629 DISALLOW_EVIL_CONSTRUCTORS(RenderViewHost);
617 }; 630 };
618 631
619 // Factory for creating RenderViewHosts. Useful for unit tests. 632 // Factory for creating RenderViewHosts. Useful for unit tests.
620 class RenderViewHostFactory { 633 class RenderViewHostFactory {
621 public: 634 public:
622 virtual ~RenderViewHostFactory() {} 635 virtual ~RenderViewHostFactory() {}
623 636
624 virtual RenderViewHost* CreateRenderViewHost( 637 virtual RenderViewHost* CreateRenderViewHost(
625 SiteInstance* instance, 638 SiteInstance* instance,
626 RenderViewHostDelegate* delegate, 639 RenderViewHostDelegate* delegate,
627 int routing_id, 640 int routing_id,
628 base::WaitableEvent* modal_dialog_event) = 0; 641 base::WaitableEvent* modal_dialog_event) = 0;
629 }; 642 };
630 643
631 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H__ 644 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H__
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_contents.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