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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 #endif // ENABLE_PLUGINS | 280 #endif // ENABLE_PLUGINS |
281 | 281 |
282 void TransferActiveWheelFlingAnimation( | 282 void TransferActiveWheelFlingAnimation( |
283 const blink::WebActiveWheelFlingParameters& params); | 283 const blink::WebActiveWheelFlingParameters& params); |
284 | 284 |
285 // Returns true if the focused element is editable text from the perspective | 285 // Returns true if the focused element is editable text from the perspective |
286 // of IME support (also used for on-screen keyboard). Works correctly inside | 286 // of IME support (also used for on-screen keyboard). Works correctly inside |
287 // supported PPAPI plugins. | 287 // supported PPAPI plugins. |
288 bool HasIMETextFocus(); | 288 bool HasIMETextFocus(); |
289 | 289 |
290 // Callback for use with GetWindowSnapshot. | |
291 typedef base::Callback<void( | |
292 const gfx::Size&, const std::vector<unsigned char>&)> | |
293 WindowSnapshotCallback; | |
294 | |
295 void GetWindowSnapshot(const WindowSnapshotCallback& callback); | |
296 | |
297 // Dispatches the current navigation state to the browser. Called on a | 290 // Dispatches the current navigation state to the browser. Called on a |
298 // periodic timer so we don't send too many messages. | 291 // periodic timer so we don't send too many messages. |
299 void SyncNavigationState(); | 292 void SyncNavigationState(); |
300 | 293 |
301 // Returns the length of the session history of this RenderView. Note that | 294 // Returns the length of the session history of this RenderView. Note that |
302 // this only coincides with the actual length of the session history if this | 295 // this only coincides with the actual length of the session history if this |
303 // RenderView is the currently active RenderView of a WebContents. | 296 // RenderView is the currently active RenderView of a WebContents. |
304 unsigned GetLocalSessionHistoryLengthForTesting() const; | 297 unsigned GetLocalSessionHistoryLengthForTesting() const; |
305 | 298 |
306 // Invokes OnSetFocus and marks the widget as active depending on the value | 299 // Invokes OnSetFocus and marks the widget as active depending on the value |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 671 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
679 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level); | 672 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level); |
680 void OnStopFinding(StopFindAction action); | 673 void OnStopFinding(StopFindAction action); |
681 void OnSuppressDialogsUntilSwapOut(); | 674 void OnSuppressDialogsUntilSwapOut(); |
682 void OnThemeChanged(); | 675 void OnThemeChanged(); |
683 void OnUpdateTargetURLAck(); | 676 void OnUpdateTargetURLAck(); |
684 void OnUpdateWebPreferences(const WebPreferences& prefs); | 677 void OnUpdateWebPreferences(const WebPreferences& prefs); |
685 void OnResetPageScale(); | 678 void OnResetPageScale(); |
686 void OnZoom(PageZoom zoom); | 679 void OnZoom(PageZoom zoom); |
687 void OnEnableViewSourceMode(); | 680 void OnEnableViewSourceMode(); |
688 void OnWindowSnapshotCompleted(const int snapshot_id, | |
689 const gfx::Size& size, const std::vector<unsigned char>& png); | |
690 void OnForceRedraw(int request_id); | 681 void OnForceRedraw(int request_id); |
691 void OnSelectWordAroundCaret(); | 682 void OnSelectWordAroundCaret(); |
692 #if defined(OS_ANDROID) | 683 #if defined(OS_ANDROID) |
693 void OnActivateNearestFindResult(int request_id, float x, float y); | 684 void OnActivateNearestFindResult(int request_id, float x, float y); |
694 void OnFindMatchRects(int current_version); | 685 void OnFindMatchRects(int current_version); |
695 void OnUndoScrollFocusedEditableNodeIntoRect(); | 686 void OnUndoScrollFocusedEditableNodeIntoRect(); |
696 void OnUpdateTopControlsState(bool enable_hiding, | 687 void OnUpdateTopControlsState(bool enable_hiding, |
697 bool enable_showing, | 688 bool enable_showing, |
698 bool animate); | 689 bool animate); |
699 void OnExtractSmartClipData(const gfx::Rect& rect); | 690 void OnExtractSmartClipData(const gfx::Rect& rect); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 // Shall be cleared as soon as the next key event is processed. | 1010 // Shall be cleared as soon as the next key event is processed. |
1020 EditCommands edit_commands_; | 1011 EditCommands edit_commands_; |
1021 | 1012 |
1022 // All the registered observers. We expect this list to be small, so vector | 1013 // All the registered observers. We expect this list to be small, so vector |
1023 // is fine. | 1014 // is fine. |
1024 ObserverList<RenderViewObserver> observers_; | 1015 ObserverList<RenderViewObserver> observers_; |
1025 | 1016 |
1026 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. | 1017 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
1027 scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; | 1018 scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
1028 | 1019 |
1029 // State associated with the GetWindowSnapshot function. | |
1030 int next_snapshot_id_; | |
1031 typedef std::map<int, WindowSnapshotCallback> PendingSnapshotMap; | |
1032 PendingSnapshotMap pending_snapshots_; | |
1033 | |
1034 // This field stores drag/drop related info for the event that is currently | 1020 // This field stores drag/drop related info for the event that is currently |
1035 // being handled. If the current event results in starting a drag/drop | 1021 // being handled. If the current event results in starting a drag/drop |
1036 // session, this info is sent to the browser along with other drag/drop info. | 1022 // session, this info is sent to the browser along with other drag/drop info. |
1037 DragEventSourceInfo possible_drag_event_info_; | 1023 DragEventSourceInfo possible_drag_event_info_; |
1038 | 1024 |
1039 // NOTE: stats_collection_observer_ should be the last members because their | 1025 // NOTE: stats_collection_observer_ should be the last members because their |
1040 // constructors call the AddObservers method of RenderViewImpl. | 1026 // constructors call the AddObservers method of RenderViewImpl. |
1041 scoped_ptr<StatsCollectionObserver> stats_collection_observer_; | 1027 scoped_ptr<StatsCollectionObserver> stats_collection_observer_; |
1042 | 1028 |
1043 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap; | 1029 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap; |
(...skipping 12 matching lines...) Expand all Loading... |
1056 // use the Observer interface to filter IPC messages and receive frame change | 1042 // use the Observer interface to filter IPC messages and receive frame change |
1057 // notifications. | 1043 // notifications. |
1058 // --------------------------------------------------------------------------- | 1044 // --------------------------------------------------------------------------- |
1059 | 1045 |
1060 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1046 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1061 }; | 1047 }; |
1062 | 1048 |
1063 } // namespace content | 1049 } // namespace content |
1064 | 1050 |
1065 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1051 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |