OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView | 183 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView |
184 // responsible for creating this RenderView. | 184 // responsible for creating this RenderView. |
185 static RenderViewImpl* Create( | 185 static RenderViewImpl* Create( |
186 int32 opener_id, | 186 int32 opener_id, |
187 const RendererPreferences& renderer_prefs, | 187 const RendererPreferences& renderer_prefs, |
188 const WebPreferences& webkit_prefs, | 188 const WebPreferences& webkit_prefs, |
189 int32 routing_id, | 189 int32 routing_id, |
190 int32 main_frame_routing_id, | 190 int32 main_frame_routing_id, |
191 int32 surface_id, | 191 int32 surface_id, |
192 int64 session_storage_namespace_id, | 192 int64 session_storage_namespace_id, |
193 const string16& frame_name, | 193 const base::string16& frame_name, |
194 bool is_renderer_created, | 194 bool is_renderer_created, |
195 bool swapped_out, | 195 bool swapped_out, |
196 bool hidden, | 196 bool hidden, |
197 int32 next_page_id, | 197 int32 next_page_id, |
198 const blink::WebScreenInfo& screen_info, | 198 const blink::WebScreenInfo& screen_info, |
199 AccessibilityMode accessibility_mode, | 199 AccessibilityMode accessibility_mode, |
200 bool allow_partial_swap); | 200 bool allow_partial_swap); |
201 | 201 |
202 // Used by content_layouttest_support to hook into the creation of | 202 // Used by content_layouttest_support to hook into the creation of |
203 // RenderViewImpls. | 203 // RenderViewImpls. |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; | 622 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; |
623 virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE; | 623 virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE; |
624 virtual blink::WebView* GetWebView() OVERRIDE; | 624 virtual blink::WebView* GetWebView() OVERRIDE; |
625 virtual blink::WebNode GetFocusedNode() const OVERRIDE; | 625 virtual blink::WebNode GetFocusedNode() const OVERRIDE; |
626 virtual blink::WebNode GetContextMenuNode() const OVERRIDE; | 626 virtual blink::WebNode GetContextMenuNode() const OVERRIDE; |
627 virtual bool IsEditableNode(const blink::WebNode& node) const OVERRIDE; | 627 virtual bool IsEditableNode(const blink::WebNode& node) const OVERRIDE; |
628 virtual blink::WebPlugin* CreatePlugin( | 628 virtual blink::WebPlugin* CreatePlugin( |
629 blink::WebFrame* frame, | 629 blink::WebFrame* frame, |
630 const WebPluginInfo& info, | 630 const WebPluginInfo& info, |
631 const blink::WebPluginParams& params) OVERRIDE; | 631 const blink::WebPluginParams& params) OVERRIDE; |
632 virtual void EvaluateScript(const string16& frame_xpath, | 632 virtual void EvaluateScript(const base::string16& frame_xpath, |
633 const string16& jscript, | 633 const base::string16& jscript, |
634 int id, | 634 int id, |
635 bool notify_result) OVERRIDE; | 635 bool notify_result) OVERRIDE; |
636 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; | 636 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; |
637 virtual int GetEnabledBindings() const OVERRIDE; | 637 virtual int GetEnabledBindings() const OVERRIDE; |
638 virtual bool GetContentStateImmediately() const OVERRIDE; | 638 virtual bool GetContentStateImmediately() const OVERRIDE; |
639 virtual float GetFilteredTimePerFrame() const OVERRIDE; | 639 virtual float GetFilteredTimePerFrame() const OVERRIDE; |
640 virtual int ShowContextMenu(ContextMenuClient* client, | 640 virtual int ShowContextMenu(ContextMenuClient* client, |
641 const ContextMenuParams& params) OVERRIDE; | 641 const ContextMenuParams& params) OVERRIDE; |
642 virtual void CancelContextMenu(int request_id) OVERRIDE; | 642 virtual void CancelContextMenu(int request_id) OVERRIDE; |
643 virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE; | 643 virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 const blink::WebGestureEvent& event) OVERRIDE; | 698 const blink::WebGestureEvent& event) OVERRIDE; |
699 virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) OVERRIDE; | 699 virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) OVERRIDE; |
700 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) OVERRIDE; | 700 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) OVERRIDE; |
701 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const OVERRIDE; | 701 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const OVERRIDE; |
702 virtual void OnSetFocus(bool enable) OVERRIDE; | 702 virtual void OnSetFocus(bool enable) OVERRIDE; |
703 virtual void OnWasHidden() OVERRIDE; | 703 virtual void OnWasHidden() OVERRIDE; |
704 virtual void OnWasShown(bool needs_repainting) OVERRIDE; | 704 virtual void OnWasShown(bool needs_repainting) OVERRIDE; |
705 virtual GURL GetURLForGraphicsContext3D() OVERRIDE; | 705 virtual GURL GetURLForGraphicsContext3D() OVERRIDE; |
706 virtual bool ForceCompositingModeEnabled() OVERRIDE; | 706 virtual bool ForceCompositingModeEnabled() OVERRIDE; |
707 virtual void OnImeSetComposition( | 707 virtual void OnImeSetComposition( |
708 const string16& text, | 708 const base::string16& text, |
709 const std::vector<blink::WebCompositionUnderline>& underlines, | 709 const std::vector<blink::WebCompositionUnderline>& underlines, |
710 int selection_start, | 710 int selection_start, |
711 int selection_end) OVERRIDE; | 711 int selection_end) OVERRIDE; |
712 virtual void OnImeConfirmComposition(const string16& text, | 712 virtual void OnImeConfirmComposition(const base::string16& text, |
713 const gfx::Range& replacement_range, | 713 const gfx::Range& replacement_range, |
714 bool keep_selection) OVERRIDE; | 714 bool keep_selection) OVERRIDE; |
715 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; | 715 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; |
716 virtual ui::TextInputType GetTextInputType() OVERRIDE; | 716 virtual ui::TextInputType GetTextInputType() OVERRIDE; |
717 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) OVERRIDE; | 717 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) OVERRIDE; |
718 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) | 718 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) |
719 virtual void GetCompositionCharacterBounds( | 719 virtual void GetCompositionCharacterBounds( |
720 std::vector<gfx::Rect>* character_bounds) OVERRIDE; | 720 std::vector<gfx::Rect>* character_bounds) OVERRIDE; |
721 virtual void GetCompositionRange(gfx::Range* range) OVERRIDE; | 721 virtual void GetCompositionRange(gfx::Range* range) OVERRIDE; |
722 #endif | 722 #endif |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 const blink::WebURLRequest& request); | 812 const blink::WebURLRequest& request); |
813 | 813 |
814 static Referrer GetReferrerFromRequest( | 814 static Referrer GetReferrerFromRequest( |
815 blink::WebFrame* frame, | 815 blink::WebFrame* frame, |
816 const blink::WebURLRequest& request); | 816 const blink::WebURLRequest& request); |
817 | 817 |
818 static webkit_glue::WebURLResponseExtraDataImpl* GetExtraDataFromResponse( | 818 static webkit_glue::WebURLResponseExtraDataImpl* GetExtraDataFromResponse( |
819 const blink::WebURLResponse& response); | 819 const blink::WebURLResponse& response); |
820 | 820 |
821 void UpdateURL(blink::WebFrame* frame); | 821 void UpdateURL(blink::WebFrame* frame); |
822 void UpdateTitle(blink::WebFrame* frame, const string16& title, | 822 void UpdateTitle(blink::WebFrame* frame, const base::string16& title, |
823 blink::WebTextDirection title_direction); | 823 blink::WebTextDirection title_direction); |
824 void UpdateSessionHistory(blink::WebFrame* frame); | 824 void UpdateSessionHistory(blink::WebFrame* frame); |
825 void SendUpdateState(const blink::WebHistoryItem& item); | 825 void SendUpdateState(const blink::WebHistoryItem& item); |
826 | 826 |
827 // Update current main frame's encoding and send it to browser window. | 827 // Update current main frame's encoding and send it to browser window. |
828 // Since we want to let users see the right encoding info from menu | 828 // Since we want to let users see the right encoding info from menu |
829 // before finishing loading, we call the UpdateEncoding in | 829 // before finishing loading, we call the UpdateEncoding in |
830 // a) function:DidCommitLoadForFrame. When this function is called, | 830 // a) function:DidCommitLoadForFrame. When this function is called, |
831 // that means we have got first data. In here we try to get encoding | 831 // that means we have got first data. In here we try to get encoding |
832 // of page if it has been specified in http header. | 832 // of page if it has been specified in http header. |
833 // b) function:DidReceiveTitle. When this function is called, | 833 // b) function:DidReceiveTitle. When this function is called, |
834 // that means we have got specified title. Because in most of webpages, | 834 // that means we have got specified title. Because in most of webpages, |
835 // title tags will follow meta tags. In here we try to get encoding of | 835 // title tags will follow meta tags. In here we try to get encoding of |
836 // page if it has been specified in meta tag. | 836 // page if it has been specified in meta tag. |
837 // c) function:DidFinishDocumentLoadForFrame. When this function is | 837 // c) function:DidFinishDocumentLoadForFrame. When this function is |
838 // called, that means we have got whole html page. In here we should | 838 // called, that means we have got whole html page. In here we should |
839 // finally get right encoding of page. | 839 // finally get right encoding of page. |
840 void UpdateEncoding(blink::WebFrame* frame, | 840 void UpdateEncoding(blink::WebFrame* frame, |
841 const std::string& encoding_name); | 841 const std::string& encoding_name); |
842 | 842 |
843 void OpenURL(blink::WebFrame* frame, | 843 void OpenURL(blink::WebFrame* frame, |
844 const GURL& url, | 844 const GURL& url, |
845 const Referrer& referrer, | 845 const Referrer& referrer, |
846 blink::WebNavigationPolicy policy); | 846 blink::WebNavigationPolicy policy); |
847 | 847 |
848 bool RunJavaScriptMessage(JavaScriptMessageType type, | 848 bool RunJavaScriptMessage(JavaScriptMessageType type, |
849 const string16& message, | 849 const base::string16& message, |
850 const string16& default_value, | 850 const base::string16& default_value, |
851 const GURL& frame_url, | 851 const GURL& frame_url, |
852 string16* result); | 852 base::string16* result); |
853 | 853 |
854 // Sends a message and runs a nested message loop. | 854 // Sends a message and runs a nested message loop. |
855 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); | 855 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); |
856 | 856 |
857 // Called when the "pinned to left/right edge" state needs to be updated. | 857 // Called when the "pinned to left/right edge" state needs to be updated. |
858 void UpdateScrollState(blink::WebFrame* frame); | 858 void UpdateScrollState(blink::WebFrame* frame); |
859 | 859 |
860 // IPC message handlers ------------------------------------------------------ | 860 // IPC message handlers ------------------------------------------------------ |
861 // | 861 // |
862 // The documentation for these functions should be in | 862 // The documentation for these functions should be in |
863 // content/common/*_messages.h for the message that the function is handling. | 863 // content/common/*_messages.h for the message that the function is handling. |
864 | 864 |
865 void OnCopy(); | 865 void OnCopy(); |
866 void OnCut(); | 866 void OnCut(); |
867 void OnDelete(); | 867 void OnDelete(); |
868 void OnExecuteEditCommand(const std::string& name, const std::string& value); | 868 void OnExecuteEditCommand(const std::string& name, const std::string& value); |
869 void OnMoveCaret(const gfx::Point& point); | 869 void OnMoveCaret(const gfx::Point& point); |
870 void OnPaste(); | 870 void OnPaste(); |
871 void OnPasteAndMatchStyle(); | 871 void OnPasteAndMatchStyle(); |
872 void OnRedo(); | 872 void OnRedo(); |
873 void OnReplace(const string16& text); | 873 void OnReplace(const base::string16& text); |
874 void OnReplaceMisspelling(const string16& text); | 874 void OnReplaceMisspelling(const base::string16& text); |
875 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); | 875 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); |
876 void OnSelectAll(); | 876 void OnSelectAll(); |
877 void OnSelectRange(const gfx::Point& start, const gfx::Point& end); | 877 void OnSelectRange(const gfx::Point& start, const gfx::Point& end); |
878 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); | 878 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); |
879 void OnUndo(); | 879 void OnUndo(); |
880 void OnUnselect(); | 880 void OnUnselect(); |
881 void OnAllowBindings(int enabled_bindings_flags); | 881 void OnAllowBindings(int enabled_bindings_flags); |
882 void OnAllowScriptToClose(bool script_can_close); | 882 void OnAllowScriptToClose(bool script_can_close); |
883 void OnCancelDownload(int32 download_id); | 883 void OnCancelDownload(int32 download_id); |
884 void OnClearFocusedNode(); | 884 void OnClearFocusedNode(); |
885 void OnClosePage(); | 885 void OnClosePage(); |
886 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); | 886 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); |
887 void OnShowContextMenu(const gfx::Point& location); | 887 void OnShowContextMenu(const gfx::Point& location); |
888 void OnCopyImageAt(int x, int y); | 888 void OnCopyImageAt(int x, int y); |
889 void OnCSSInsertRequest(const string16& frame_xpath, | 889 void OnCSSInsertRequest(const base::string16& frame_xpath, |
890 const std::string& css); | 890 const std::string& css); |
891 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, | 891 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, |
892 unsigned action); | 892 unsigned action); |
893 void OnSetName(const std::string& name); | 893 void OnSetName(const std::string& name); |
894 void OnDeterminePageLanguage(); | 894 void OnDeterminePageLanguage(); |
895 void OnDisableScrollbarsForSmallWindows( | 895 void OnDisableScrollbarsForSmallWindows( |
896 const gfx::Size& disable_scrollbars_size_limit); | 896 const gfx::Size& disable_scrollbars_size_limit); |
897 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 897 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
898 const gfx::Point& screen_point, | 898 const gfx::Point& screen_point, |
899 bool ended, | 899 bool ended, |
(...skipping 13 matching lines...) Expand all Loading... |
913 blink::WebDragOperationsMask operations_allowed, | 913 blink::WebDragOperationsMask operations_allowed, |
914 int key_modifiers); | 914 int key_modifiers); |
915 void OnEnablePreferredSizeChangedMode(); | 915 void OnEnablePreferredSizeChangedMode(); |
916 void OnEnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size); | 916 void OnEnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size); |
917 void OnDisableAutoResize(const gfx::Size& new_size); | 917 void OnDisableAutoResize(const gfx::Size& new_size); |
918 void OnEnumerateDirectoryResponse(int id, | 918 void OnEnumerateDirectoryResponse(int id, |
919 const std::vector<base::FilePath>& paths); | 919 const std::vector<base::FilePath>& paths); |
920 void OnExtendSelectionAndDelete(int before, int after); | 920 void OnExtendSelectionAndDelete(int before, int after); |
921 void OnFileChooserResponse( | 921 void OnFileChooserResponse( |
922 const std::vector<ui::SelectedFileInfo>& files); | 922 const std::vector<ui::SelectedFileInfo>& files); |
923 void OnFind(int request_id, const string16&, const blink::WebFindOptions&); | 923 void OnFind(int request_id, |
| 924 const base::string16&, |
| 925 const blink::WebFindOptions&); |
924 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); | 926 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); |
925 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 927 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
926 const std::vector<GURL>& links, | 928 const std::vector<GURL>& links, |
927 const std::vector<base::FilePath>& local_paths, | 929 const std::vector<base::FilePath>& local_paths, |
928 const base::FilePath& local_directory_name); | 930 const base::FilePath& local_directory_name); |
929 void OnMediaPlayerActionAt(const gfx::Point& location, | 931 void OnMediaPlayerActionAt(const gfx::Point& location, |
930 const blink::WebMediaPlayerAction& action); | 932 const blink::WebMediaPlayerAction& action); |
931 void OnOrientationChangeEvent(int orientation); | 933 void OnOrientationChangeEvent(int orientation); |
932 void OnPluginActionAt(const gfx::Point& location, | 934 void OnPluginActionAt(const gfx::Point& location, |
933 const blink::WebPluginAction& action); | 935 const blink::WebPluginAction& action); |
934 void OnMoveOrResizeStarted(); | 936 void OnMoveOrResizeStarted(); |
935 void OnNavigate(const ViewMsg_Navigate_Params& params); | 937 void OnNavigate(const ViewMsg_Navigate_Params& params); |
936 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); | 938 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); |
937 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle); | 939 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle); |
938 void OnReloadFrame(); | 940 void OnReloadFrame(); |
939 void OnResetPageEncodingToDefault(); | 941 void OnResetPageEncodingToDefault(); |
940 void OnScriptEvalRequest(const string16& frame_xpath, | 942 void OnScriptEvalRequest(const base::string16& frame_xpath, |
941 const string16& jscript, | 943 const base::string16& jscript, |
942 int id, | 944 int id, |
943 bool notify_result); | 945 bool notify_result); |
944 void OnSetAccessibilityMode(AccessibilityMode new_mode); | 946 void OnSetAccessibilityMode(AccessibilityMode new_mode); |
945 void OnSetActive(bool active); | 947 void OnSetActive(bool active); |
946 void OnSetAltErrorPageURL(const GURL& gurl); | 948 void OnSetAltErrorPageURL(const GURL& gurl); |
947 void OnSetBackground(const SkBitmap& background); | 949 void OnSetBackground(const SkBitmap& background); |
948 void OnSetCompositionFromExistingText( | 950 void OnSetCompositionFromExistingText( |
949 int start, int end, | 951 int start, int end, |
950 const std::vector<blink::WebCompositionUnderline>& underlines); | 952 const std::vector<blink::WebCompositionUnderline>& underlines); |
951 void OnExitFullscreen(); | 953 void OnExitFullscreen(); |
(...skipping 26 matching lines...) Expand all Loading... |
978 void OnSelectPopupMenuItems(bool canceled, | 980 void OnSelectPopupMenuItems(bool canceled, |
979 const std::vector<int>& selected_indices); | 981 const std::vector<int>& selected_indices); |
980 void OnUndoScrollFocusedEditableNodeIntoRect(); | 982 void OnUndoScrollFocusedEditableNodeIntoRect(); |
981 void OnUpdateTopControlsState(bool enable_hiding, | 983 void OnUpdateTopControlsState(bool enable_hiding, |
982 bool enable_showing, | 984 bool enable_showing, |
983 bool animate); | 985 bool animate); |
984 void OnPauseVideo(); | 986 void OnPauseVideo(); |
985 | 987 |
986 #elif defined(OS_MACOSX) | 988 #elif defined(OS_MACOSX) |
987 void OnCopyToFindPboard(); | 989 void OnCopyToFindPboard(); |
988 void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); | 990 void OnPluginImeCompositionCompleted(const base::string16& text, |
| 991 int plugin_id); |
989 void OnSelectPopupMenuItem(int selected_index); | 992 void OnSelectPopupMenuItem(int selected_index); |
990 void OnSetInLiveResize(bool in_live_resize); | 993 void OnSetInLiveResize(bool in_live_resize); |
991 void OnSetWindowVisibility(bool visible); | 994 void OnSetWindowVisibility(bool visible); |
992 void OnWindowFrameChanged(const gfx::Rect& window_frame, | 995 void OnWindowFrameChanged(const gfx::Rect& window_frame, |
993 const gfx::Rect& view_frame); | 996 const gfx::Rect& view_frame); |
994 #endif | 997 #endif |
995 | 998 |
996 // Adding a new message handler? Please add it in alphabetical order above | 999 // Adding a new message handler? Please add it in alphabetical order above |
997 // and put it in the same position in the .cc file. | 1000 // and put it in the same position in the .cc file. |
998 | 1001 |
(...skipping 25 matching lines...) Expand all Loading... |
1024 // started, false otherwise. id is used to uniquely identify the request and | 1027 // started, false otherwise. id is used to uniquely identify the request and |
1025 // passed back to the DidDownloadFavicon method. If the image has multiple | 1028 // passed back to the DidDownloadFavicon method. If the image has multiple |
1026 // frames, the frame whose size is image_size is returned. If the image | 1029 // frames, the frame whose size is image_size is returned. If the image |
1027 // doesn't have a frame at the specified size, the first is returned. | 1030 // doesn't have a frame at the specified size, the first is returned. |
1028 bool DownloadFavicon(int id, const GURL& image_url, int image_size); | 1031 bool DownloadFavicon(int id, const GURL& image_url, int image_size); |
1029 | 1032 |
1030 GURL GetAlternateErrorPageURL(const GURL& failed_url, | 1033 GURL GetAlternateErrorPageURL(const GURL& failed_url, |
1031 ErrorPageType error_type); | 1034 ErrorPageType error_type); |
1032 | 1035 |
1033 // Locates a sub frame with given xpath | 1036 // Locates a sub frame with given xpath |
1034 blink::WebFrame* GetChildFrame(const string16& frame_xpath) const; | 1037 blink::WebFrame* GetChildFrame(const base::string16& frame_xpath) const; |
1035 | 1038 |
1036 // Returns the URL being loaded by the given frame's request. | 1039 // Returns the URL being loaded by the given frame's request. |
1037 GURL GetLoadingUrl(blink::WebFrame* frame) const; | 1040 GURL GetLoadingUrl(blink::WebFrame* frame) const; |
1038 | 1041 |
1039 // Should only be called if this object wraps a PluginDocument. | 1042 // Should only be called if this object wraps a PluginDocument. |
1040 blink::WebPlugin* GetWebPluginFromPluginDocument(); | 1043 blink::WebPlugin* GetWebPluginFromPluginDocument(); |
1041 | 1044 |
1042 // Returns true if the |params| navigation is to an entry that has been | 1045 // Returns true if the |params| navigation is to an entry that has been |
1043 // cropped due to a recent navigation the browser did not know about. | 1046 // cropped due to a recent navigation the browser did not know about. |
1044 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, | 1047 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 // synchronous find request. | 1085 // synchronous find request. |
1083 void SendFindReply(int request_id, | 1086 void SendFindReply(int request_id, |
1084 int match_count, | 1087 int match_count, |
1085 int ordinal, | 1088 int ordinal, |
1086 const blink::WebRect& selection_rect, | 1089 const blink::WebRect& selection_rect, |
1087 bool final_status_update); | 1090 bool final_status_update); |
1088 | 1091 |
1089 // Returns whether |params.selection_text| should be synchronized to the | 1092 // Returns whether |params.selection_text| should be synchronized to the |
1090 // browser before bringing up the context menu. Static for testing. | 1093 // browser before bringing up the context menu. Static for testing. |
1091 static bool ShouldUpdateSelectionTextFromContextMenuParams( | 1094 static bool ShouldUpdateSelectionTextFromContextMenuParams( |
1092 const string16& selection_text, | 1095 const base::string16& selection_text, |
1093 size_t selection_text_offset, | 1096 size_t selection_text_offset, |
1094 const gfx::Range& selection_range, | 1097 const gfx::Range& selection_range, |
1095 const ContextMenuParams& params); | 1098 const ContextMenuParams& params); |
1096 | 1099 |
1097 // Starts nav_state_sync_timer_ if it isn't already running. | 1100 // Starts nav_state_sync_timer_ if it isn't already running. |
1098 void StartNavStateSyncTimerIfNecessary(); | 1101 void StartNavStateSyncTimerIfNecessary(); |
1099 | 1102 |
1100 // Dispatches the current state of selection on the webpage to the browser if | 1103 // Dispatches the current state of selection on the webpage to the browser if |
1101 // it has changed. | 1104 // it has changed. |
1102 // TODO(varunjain): delete this method once we figure out how to keep | 1105 // TODO(varunjain): delete this method once we figure out how to keep |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 GURL focus_url_; | 1285 GURL focus_url_; |
1283 | 1286 |
1284 // The next target URL we want to send to the browser. | 1287 // The next target URL we want to send to the browser. |
1285 GURL pending_target_url_; | 1288 GURL pending_target_url_; |
1286 | 1289 |
1287 // The text selection the last time DidChangeSelection got called. May contain | 1290 // The text selection the last time DidChangeSelection got called. May contain |
1288 // additional characters before and after the selected text, for IMEs. The | 1291 // additional characters before and after the selected text, for IMEs. The |
1289 // portion of this string that is the actual selected text starts at index | 1292 // portion of this string that is the actual selected text starts at index |
1290 // |selection_range_.GetMin() - selection_text_offset_| and has length | 1293 // |selection_range_.GetMin() - selection_text_offset_| and has length |
1291 // |selection_range_.length()|. | 1294 // |selection_range_.length()|. |
1292 string16 selection_text_; | 1295 base::string16 selection_text_; |
1293 // The offset corresponding to the start of |selection_text_| in the document. | 1296 // The offset corresponding to the start of |selection_text_| in the document. |
1294 size_t selection_text_offset_; | 1297 size_t selection_text_offset_; |
1295 // Range over the document corresponding to the actual selected text (which | 1298 // Range over the document corresponding to the actual selected text (which |
1296 // could correspond to a substring of |selection_text_|; see above). | 1299 // could correspond to a substring of |selection_text_|; see above). |
1297 gfx::Range selection_range_; | 1300 gfx::Range selection_range_; |
1298 | 1301 |
1299 // External context menu requests we're waiting for. "Internal" | 1302 // External context menu requests we're waiting for. "Internal" |
1300 // (WebKit-originated) context menu events will have an ID of 0 and will not | 1303 // (WebKit-originated) context menu events will have an ID of 0 and will not |
1301 // be in this map. | 1304 // be in this map. |
1302 // | 1305 // |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 // use the Observer interface to filter IPC messages and receive frame change | 1503 // use the Observer interface to filter IPC messages and receive frame change |
1501 // notifications. | 1504 // notifications. |
1502 // --------------------------------------------------------------------------- | 1505 // --------------------------------------------------------------------------- |
1503 | 1506 |
1504 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1507 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1505 }; | 1508 }; |
1506 | 1509 |
1507 } // namespace content | 1510 } // namespace content |
1508 | 1511 |
1509 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1512 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |