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

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

Issue 6025009: Get rid of RenderViewHostDelegate::Resource and dispatch the IPC messages dir... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "chrome/browser/renderer_host/render_widget_host.h" 14 #include "chrome/browser/renderer_host/render_widget_host.h"
15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 15 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
16 #include "chrome/common/content_settings_types.h" 16 #include "chrome/common/content_settings_types.h"
17 #include "chrome/common/page_zoom.h" 17 #include "chrome/common/page_zoom.h"
18 #include "chrome/common/translate_errors.h" 18 #include "chrome/common/translate_errors.h"
19 #include "chrome/common/view_types.h" 19 #include "chrome/common/view_types.h"
20 #include "chrome/common/window_container_type.h" 20 #include "chrome/common/window_container_type.h"
21 #include "net/base/load_states.h" 21 #include "net/base/load_states.h"
22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" 22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
23 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" 23 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h"
24 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" 24 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h"
25 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" 25 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
26 #include "webkit/glue/webaccessibility.h" 26 #include "webkit/glue/webaccessibility.h"
27 #include "webkit/glue/window_open_disposition.h" 27 #include "webkit/glue/window_open_disposition.h"
28 28
29 class ChildProcessSecurityPolicy;
29 class FilePath; 30 class FilePath;
30 class GURL; 31 class GURL;
31 class ListValue; 32 class ListValue;
32 class RenderViewHostDelegate; 33 class RenderViewHostDelegate;
33 class SessionStorageNamespace; 34 class SessionStorageNamespace;
34 class SiteInstance; 35 class SiteInstance;
35 class SkBitmap; 36 class SkBitmap;
36 class ViewMsg_Navigate; 37 class ViewMsg_Navigate;
37 struct ContentSettings; 38 struct ContentSettings;
38 struct ContextMenuParams; 39 struct ContextMenuParams;
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 save_accessibility_tree_for_testing_ = save; 532 save_accessibility_tree_for_testing_ = save;
532 } 533 }
533 534
534 const webkit_glue::WebAccessibility& accessibility_tree() { 535 const webkit_glue::WebAccessibility& accessibility_tree() {
535 return accessibility_tree_; 536 return accessibility_tree_;
536 } 537 }
537 538
538 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } 539 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; }
539 #endif 540 #endif
540 541
542 // Checks that the given renderer can request |url|, if not it sets it to an
543 // empty url.
544 static void FilterURL(ChildProcessSecurityPolicy* policy,
545 int renderer_id,
546 GURL* url);
547
541 protected: 548 protected:
542 // RenderWidgetHost protected overrides. 549 // RenderWidgetHost protected overrides.
543 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 550 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
544 bool* is_keyboard_shortcut); 551 bool* is_keyboard_shortcut);
545 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); 552 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event);
546 virtual void OnUserGesture(); 553 virtual void OnUserGesture();
547 virtual void NotifyRendererUnresponsive(); 554 virtual void NotifyRendererUnresponsive();
548 virtual void NotifyRendererResponsive(); 555 virtual void NotifyRendererResponsive();
549 virtual void OnMsgFocusedNodeChanged(bool is_editable_node); 556 virtual void OnMsgFocusedNodeChanged(bool is_editable_node);
550 virtual void OnMsgFocus(); 557 virtual void OnMsgFocus();
(...skipping 14 matching lines...) Expand all
565 const std::string& state); 572 const std::string& state);
566 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title); 573 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title);
567 void OnMsgUpdateEncoding(const std::string& encoding); 574 void OnMsgUpdateEncoding(const std::string& encoding);
568 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url); 575 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url);
569 void OnMsgThumbnail(const GURL& url, 576 void OnMsgThumbnail(const GURL& url,
570 const ThumbnailScore& score, 577 const ThumbnailScore& score,
571 const SkBitmap& bitmap); 578 const SkBitmap& bitmap);
572 void OnMsgScreenshot(const SkBitmap& bitmap); 579 void OnMsgScreenshot(const SkBitmap& bitmap);
573 void OnMsgClose(); 580 void OnMsgClose();
574 void OnMsgRequestMove(const gfx::Rect& pos); 581 void OnMsgRequestMove(const gfx::Rect& pos);
575 void OnMsgDidRedirectProvisionalLoad(int32 page_id,
576 const GURL& source_url,
577 const GURL& target_url);
578 void OnMsgDidStartLoading(); 582 void OnMsgDidStartLoading();
579 void OnMsgDidStopLoading(); 583 void OnMsgDidStopLoading();
580 void OnMsgDidChangeLoadProgress(double load_progress); 584 void OnMsgDidChangeLoadProgress(double load_progress);
581 void OnMsgDocumentAvailableInMainFrame(); 585 void OnMsgDocumentAvailableInMainFrame();
582 void OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id); 586 void OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id);
583 void OnMsgDidLoadResourceFromMemoryCache(const GURL& url,
584 const std::string& frame_origin,
585 const std::string& main_frame_origin,
586 const std::string& security_info);
587 void OnMsgDidDisplayInsecureContent();
588 void OnMsgDidRunInsecureContent(const std::string& security_origin);
589 void OnMsgDidStartProvisionalLoadForFrame(int64 frame_id,
590 bool main_frame,
591 const GURL& url);
592 void OnMsgDidFailProvisionalLoadWithError(int64 frame_id,
593 bool main_frame,
594 int error_code,
595 const GURL& url,
596 bool showing_repost_interstitial);
597 void OnMsgFindReply(int request_id, 587 void OnMsgFindReply(int request_id,
598 int number_of_matches, 588 int number_of_matches,
599 const gfx::Rect& selection_rect, 589 const gfx::Rect& selection_rect,
600 int active_match_ordinal, 590 int active_match_ordinal,
601 bool final_update); 591 bool final_update);
602 void OnExecuteCodeFinished(int request_id, bool success); 592 void OnExecuteCodeFinished(int request_id, bool success);
603 void OnMsgUpdateFavIconURL(int32 page_id, const GURL& icon_url); 593 void OnMsgUpdateFavIconURL(int32 page_id, const GURL& icon_url);
604 void OnMsgDidDownloadFavIcon(int id, 594 void OnMsgDidDownloadFavIcon(int id,
605 const GURL& image_url, 595 const GURL& image_url,
606 bool errored, 596 bool errored,
607 const SkBitmap& image_data); 597 const SkBitmap& image_data);
608 void OnMsgContextMenu(const ContextMenuParams& params); 598 void OnMsgContextMenu(const ContextMenuParams& params);
609 void OnMsgOpenURL(const GURL& url, const GURL& referrer, 599 void OnMsgOpenURL(const GURL& url, const GURL& referrer,
610 WindowOpenDisposition disposition); 600 WindowOpenDisposition disposition);
611 void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size); 601 void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size);
612 void OnMsgDomOperationResponse(const std::string& json_string, 602 void OnMsgDomOperationResponse(const std::string& json_string,
613 int automation_id); 603 int automation_id);
614 void OnMsgDOMUISend(const GURL& source_url, 604 void OnMsgDOMUISend(const GURL& source_url,
615 const std::string& message, 605 const std::string& message,
616 const std::string& content); 606 const std::string& content);
617 void OnMsgForwardMessageToExternalHost(const std::string& message, 607 void OnMsgForwardMessageToExternalHost(const std::string& message,
618 const std::string& origin, 608 const std::string& origin,
619 const std::string& target); 609 const std::string& target);
620 void OnMsgDocumentLoadedInFrame(int64 frame_id);
621 void OnMsgDidFinishLoad(int64 frame_id);
622 void OnMsgGoToEntryAtOffset(int offset); 610 void OnMsgGoToEntryAtOffset(int offset);
623 void OnMsgSetTooltipText(const std::wstring& tooltip_text, 611 void OnMsgSetTooltipText(const std::wstring& tooltip_text,
624 WebKit::WebTextDirection text_direction_hint); 612 WebKit::WebTextDirection text_direction_hint);
625 void OnMsgSelectionChanged(const std::string& text); 613 void OnMsgSelectionChanged(const std::string& text);
626 void OnMsgPasteFromSelectionClipboard(); 614 void OnMsgPasteFromSelectionClipboard();
627 void OnMsgRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); 615 void OnMsgRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params);
628 void OnMsgRunJavaScriptMessage(const std::wstring& message, 616 void OnMsgRunJavaScriptMessage(const std::wstring& message,
629 const std::wstring& default_prompt, 617 const std::wstring& default_prompt,
630 const GURL& frame_url, 618 const GURL& frame_url,
631 const int flags, 619 const int flags,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // The most recently received accessibility tree - for unit testing only. 818 // The most recently received accessibility tree - for unit testing only.
831 webkit_glue::WebAccessibility accessibility_tree_; 819 webkit_glue::WebAccessibility accessibility_tree_;
832 820
833 // The termination status of the last render view that terminated. 821 // The termination status of the last render view that terminated.
834 base::TerminationStatus render_view_termination_status_; 822 base::TerminationStatus render_view_termination_status_;
835 823
836 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); 824 DISALLOW_COPY_AND_ASSIGN(RenderViewHost);
837 }; 825 };
838 826
839 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 827 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698