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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 14487003: Add a new pair of IPC categories for messages that need handling as input events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addresses feedback Created 7 years, 8 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 | « content/renderer/idle_user_detector.cc ('k') | content/renderer/render_view_impl.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) 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 // Sends a message and runs a nested message loop. 900 // Sends a message and runs a nested message loop.
901 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); 901 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message);
902 902
903 // Called when the "pinned to left/right edge" state needs to be updated. 903 // Called when the "pinned to left/right edge" state needs to be updated.
904 void UpdateScrollState(WebKit::WebFrame* frame); 904 void UpdateScrollState(WebKit::WebFrame* frame);
905 905
906 // IPC message handlers ------------------------------------------------------ 906 // IPC message handlers ------------------------------------------------------
907 // 907 //
908 // The documentation for these functions should be in 908 // The documentation for these functions should be in
909 // render_messages_internal.h for the message that the function is handling. 909 // content/common/*_messages.h for the message that the function is handling.
910
911 void OnCopy();
912 void OnCut();
913 void OnDelete();
914 void OnExecuteEditCommand(const std::string& name, const std::string& value);
915 void OnMoveCaret(const gfx::Point& point);
916 void OnPaste();
917 void OnPasteAndMatchStyle();
918 void OnRedo();
919 void OnReplace(const string16& text);
920 void OnReplaceMisspelling(const string16& text);
921 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
922 void OnSelectAll();
923 void OnSelectRange(const gfx::Point& start, const gfx::Point& end);
924 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands);
925 void OnUndo();
926 void OnUnselect();
910 927
911 void OnAllowBindings(int enabled_bindings_flags); 928 void OnAllowBindings(int enabled_bindings_flags);
912 void OnAllowScriptToClose(bool script_can_close); 929 void OnAllowScriptToClose(bool script_can_close);
913 void OnAsyncFileOpened(base::PlatformFileError error_code, 930 void OnAsyncFileOpened(base::PlatformFileError error_code,
914 IPC::PlatformFileForTransit file_for_transit, 931 IPC::PlatformFileForTransit file_for_transit,
915 int message_id); 932 int message_id);
916 void OnPpapiBrokerChannelCreated(int request_id, 933 void OnPpapiBrokerChannelCreated(int request_id,
917 base::ProcessId broker_pid, 934 base::ProcessId broker_pid,
918 const IPC::ChannelHandle& handle); 935 const IPC::ChannelHandle& handle);
919 void OnPpapiBrokerPermissionResult(int request_id, bool result); 936 void OnPpapiBrokerPermissionResult(int request_id, bool result);
920 void OnCancelDownload(int32 download_id); 937 void OnCancelDownload(int32 download_id);
921 void OnClearFocusedNode(); 938 void OnClearFocusedNode();
922 void OnClosePage(); 939 void OnClosePage();
923 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); 940 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
924 void OnShowContextMenu(); 941 void OnShowContextMenu();
925 void OnCopy();
926 void OnCopyImageAt(int x, int y); 942 void OnCopyImageAt(int x, int y);
927 void OnCut();
928 void OnCSSInsertRequest(const string16& frame_xpath, 943 void OnCSSInsertRequest(const string16& frame_xpath,
929 const std::string& css); 944 const std::string& css);
930 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, 945 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
931 unsigned action); 946 unsigned action);
932 void OnDelete();
933 void OnSetName(const std::string& name); 947 void OnSetName(const std::string& name);
934 void OnDeterminePageLanguage(); 948 void OnDeterminePageLanguage();
935 void OnDisableScrollbarsForSmallWindows( 949 void OnDisableScrollbarsForSmallWindows(
936 const gfx::Size& disable_scrollbars_size_limit); 950 const gfx::Size& disable_scrollbars_size_limit);
937 void OnDisassociateFromPopupCount(); 951 void OnDisassociateFromPopupCount();
938 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, 952 void OnDragSourceEndedOrMoved(const gfx::Point& client_point,
939 const gfx::Point& screen_point, 953 const gfx::Point& screen_point,
940 bool ended, 954 bool ended,
941 WebKit::WebDragOperation drag_operation); 955 WebKit::WebDragOperation drag_operation);
942 void OnDragSourceSystemDragEnded(); 956 void OnDragSourceSystemDragEnded();
943 void OnDragTargetDrop(const gfx::Point& client_pt, 957 void OnDragTargetDrop(const gfx::Point& client_pt,
944 const gfx::Point& screen_pt, 958 const gfx::Point& screen_pt,
945 int key_modifiers); 959 int key_modifiers);
946 void OnDragTargetDragEnter(const WebDropData& drop_data, 960 void OnDragTargetDragEnter(const WebDropData& drop_data,
947 const gfx::Point& client_pt, 961 const gfx::Point& client_pt,
948 const gfx::Point& screen_pt, 962 const gfx::Point& screen_pt,
949 WebKit::WebDragOperationsMask operations_allowed, 963 WebKit::WebDragOperationsMask operations_allowed,
950 int key_modifiers); 964 int key_modifiers);
951 void OnDragTargetDragLeave(); 965 void OnDragTargetDragLeave();
952 void OnDragTargetDragOver(const gfx::Point& client_pt, 966 void OnDragTargetDragOver(const gfx::Point& client_pt,
953 const gfx::Point& screen_pt, 967 const gfx::Point& screen_pt,
954 WebKit::WebDragOperationsMask operations_allowed, 968 WebKit::WebDragOperationsMask operations_allowed,
955 int key_modifiers); 969 int key_modifiers);
956 void OnEnablePreferredSizeChangedMode(); 970 void OnEnablePreferredSizeChangedMode();
957 void OnEnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size); 971 void OnEnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size);
958 void OnDisableAutoResize(const gfx::Size& new_size); 972 void OnDisableAutoResize(const gfx::Size& new_size);
959 void OnEnumerateDirectoryResponse(int id, 973 void OnEnumerateDirectoryResponse(int id,
960 const std::vector<base::FilePath>& paths); 974 const std::vector<base::FilePath>& paths);
961 void OnExecuteEditCommand(const std::string& name, const std::string& value);
962 void OnExtendSelectionAndDelete(int before, int after); 975 void OnExtendSelectionAndDelete(int before, int after);
963 void OnFileChooserResponse( 976 void OnFileChooserResponse(
964 const std::vector<ui::SelectedFileInfo>& files); 977 const std::vector<ui::SelectedFileInfo>& files);
965 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); 978 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&);
966 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); 979 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url);
967 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( 980 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks(
968 const std::vector<GURL>& links, 981 const std::vector<GURL>& links,
969 const std::vector<base::FilePath>& local_paths, 982 const std::vector<base::FilePath>& local_paths,
970 const base::FilePath& local_directory_name); 983 const base::FilePath& local_directory_name);
971 void OnMediaPlayerActionAt(const gfx::Point& location, 984 void OnMediaPlayerActionAt(const gfx::Point& location,
972 const WebKit::WebMediaPlayerAction& action); 985 const WebKit::WebMediaPlayerAction& action);
973 986
974 // Screen has rotated. 0 = default (portrait), 90 = one turn right, and so on. 987 // Screen has rotated. 0 = default (portrait), 90 = one turn right, and so on.
975 void OnOrientationChangeEvent(int orientation); 988 void OnOrientationChangeEvent(int orientation);
976 989
977 void OnPluginActionAt(const gfx::Point& location, 990 void OnPluginActionAt(const gfx::Point& location,
978 const WebKit::WebPluginAction& action); 991 const WebKit::WebPluginAction& action);
979 void OnMoveOrResizeStarted(); 992 void OnMoveOrResizeStarted();
980 void OnNavigate(const ViewMsg_Navigate_Params& params); 993 void OnNavigate(const ViewMsg_Navigate_Params& params);
981 void OnPaste();
982 void OnPasteAndMatchStyle();
983 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); 994 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params);
984 void OnRedo();
985 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle); 995 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle);
986 void OnReloadFrame(); 996 void OnReloadFrame();
987 void OnReplace(const string16& text);
988 void OnReplaceMisspelling(const string16& text);
989 void OnResetPageEncodingToDefault(); 997 void OnResetPageEncodingToDefault();
990 void OnScriptEvalRequest(const string16& frame_xpath, 998 void OnScriptEvalRequest(const string16& frame_xpath,
991 const string16& jscript, 999 const string16& jscript,
992 int id, 1000 int id,
993 bool notify_result); 1001 bool notify_result);
994 void OnSelectAll();
995 void OnSelectRange(const gfx::Point& start, const gfx::Point& end);
996 void OnMoveCaret(const gfx::Point& point);
997 void OnSetAccessibilityMode(AccessibilityMode new_mode); 1002 void OnSetAccessibilityMode(AccessibilityMode new_mode);
998 void OnSetActive(bool active); 1003 void OnSetActive(bool active);
999 void OnSetAltErrorPageURL(const GURL& gurl); 1004 void OnSetAltErrorPageURL(const GURL& gurl);
1000 void OnSetBackground(const SkBitmap& background); 1005 void OnSetBackground(const SkBitmap& background);
1001 void OnSetCompositionFromExistingText( 1006 void OnSetCompositionFromExistingText(
1002 int start, int end, 1007 int start, int end,
1003 const std::vector<WebKit::WebCompositionUnderline>& underlines); 1008 const std::vector<WebKit::WebCompositionUnderline>& underlines);
1009 void OnExitFullscreen();
1004 void OnSetEditableSelectionOffsets(int start, int end); 1010 void OnSetEditableSelectionOffsets(int start, int end);
1005 void OnSetWebUIProperty(const std::string& name, const std::string& value);
1006 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands);
1007 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); 1011 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id);
1008 void OnSetInitialFocus(bool reverse); 1012 void OnSetInitialFocus(bool reverse);
1009 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
1010 void OnSetPageEncoding(const std::string& encoding_name); 1013 void OnSetPageEncoding(const std::string& encoding_name);
1011 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); 1014 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
1015 void OnSetWebUIProperty(const std::string& name, const std::string& value);
1012 void OnSetZoomLevel(double zoom_level); 1016 void OnSetZoomLevel(double zoom_level);
1013 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 1017 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
1014 void OnExitFullscreen();
1015 void OnShouldClose(); 1018 void OnShouldClose();
1016 void OnStop(); 1019 void OnStop();
1017 void OnStopFinding(StopFindAction action); 1020 void OnStopFinding(StopFindAction action);
1018 void OnSwapOut(const ViewMsg_SwapOut_Params& params); 1021 void OnSwapOut(const ViewMsg_SwapOut_Params& params);
1019 void OnThemeChanged(); 1022 void OnThemeChanged();
1020 void OnUndo();
1021 void OnUpdateTargetURLAck(); 1023 void OnUpdateTargetURLAck();
1022 void OnUpdateTimezone(); 1024 void OnUpdateTimezone();
1023 void OnUpdateWebPreferences(const webkit_glue::WebPreferences& prefs); 1025 void OnUpdateWebPreferences(const webkit_glue::WebPreferences& prefs);
1024 void OnUnselect();
1025 1026
1026 void OnZoom(PageZoom zoom); 1027 void OnZoom(PageZoom zoom);
1027 void OnZoomFactor(PageZoom zoom, int zoom_center_x, int zoom_center_y); 1028 void OnZoomFactor(PageZoom zoom, int zoom_center_x, int zoom_center_y);
1028 1029
1029 void OnEnableViewSourceMode(); 1030 void OnEnableViewSourceMode();
1030 1031
1031 void OnJavaBridgeInit(); 1032 void OnJavaBridgeInit();
1032 1033
1033 void OnDisownOpener(); 1034 void OnDisownOpener();
1034 1035
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 scoped_ptr<ExternalPopupMenu> external_popup_menu_; 1483 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
1483 1484
1484 // The node that the context menu was pressed over. 1485 // The node that the context menu was pressed over.
1485 WebKit::WebNode context_menu_node_; 1486 WebKit::WebNode context_menu_node_;
1486 1487
1487 // All the registered observers. We expect this list to be small, so vector 1488 // All the registered observers. We expect this list to be small, so vector
1488 // is fine. 1489 // is fine.
1489 ObserverList<RenderViewObserver> observers_; 1490 ObserverList<RenderViewObserver> observers_;
1490 1491
1491 // Used to inform didChangeSelection() when it is called in the context 1492 // Used to inform didChangeSelection() when it is called in the context
1492 // of handling a ViewMsg_SelectRange IPC. 1493 // of handling a InputMsg_SelectRange IPC.
1493 bool handling_select_range_; 1494 bool handling_select_range_;
1494 1495
1495 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. 1496 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
1496 scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; 1497 scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
1497 1498
1498 // State associated with the GetWindowSnapshot function. 1499 // State associated with the GetWindowSnapshot function.
1499 int next_snapshot_id_; 1500 int next_snapshot_id_;
1500 typedef std::map<int, WindowSnapshotCallback> 1501 typedef std::map<int, WindowSnapshotCallback>
1501 PendingSnapshotMap; 1502 PendingSnapshotMap;
1502 PendingSnapshotMap pending_snapshots_; 1503 PendingSnapshotMap pending_snapshots_;
(...skipping 23 matching lines...) Expand all
1526 // use the Observer interface to filter IPC messages and receive frame change 1527 // use the Observer interface to filter IPC messages and receive frame change
1527 // notifications. 1528 // notifications.
1528 // --------------------------------------------------------------------------- 1529 // ---------------------------------------------------------------------------
1529 1530
1530 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1531 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1531 }; 1532 };
1532 1533
1533 } // namespace content 1534 } // namespace content
1534 1535
1535 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1536 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/idle_user_detector.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698