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

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

Issue 2475443003: Drag-and-drop: Move startDrag out of WebView/RenderView. (Closed)
Patch Set: Removed unneeded declarations. Created 4 years, 1 month 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
« no previous file with comments | « content/public/browser/render_widget_host.h ('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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <deque> 11 #include <deque>
12 #include <map> 12 #include <map>
13 #include <memory> 13 #include <memory>
14 #include <set> 14 #include <set>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/id_map.h" 19 #include "base/id_map.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/observer_list.h" 22 #include "base/observer_list.h"
23 #include "base/process/process.h" 23 #include "base/process/process.h"
24 #include "base/strings/string16.h" 24 #include "base/strings/string16.h"
25 #include "base/timer/timer.h" 25 #include "base/timer/timer.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "cc/input/browser_controls_state.h" 27 #include "cc/input/browser_controls_state.h"
28 #include "cc/resources/shared_bitmap.h" 28 #include "cc/resources/shared_bitmap.h"
29 #include "content/common/content_export.h" 29 #include "content/common/content_export.h"
30 #include "content/common/drag_event_source_info.h"
31 #include "content/common/frame_message_enums.h" 30 #include "content/common/frame_message_enums.h"
32 #include "content/common/navigation_gesture.h" 31 #include "content/common/navigation_gesture.h"
33 #include "content/common/page_message_enums.h" 32 #include "content/common/page_message_enums.h"
34 #include "content/common/view_message_enums.h" 33 #include "content/common/view_message_enums.h"
35 #include "content/public/common/browser_controls_state.h" 34 #include "content/public/common/browser_controls_state.h"
36 #include "content/public/common/drop_data.h" 35 #include "content/public/common/drop_data.h"
37 #include "content/public/common/page_zoom.h" 36 #include "content/public/common/page_zoom.h"
38 #include "content/public/common/referrer.h" 37 #include "content/public/common/referrer.h"
39 #include "content/public/common/renderer_preferences.h" 38 #include "content/public/common/renderer_preferences.h"
40 #include "content/public/common/web_preferences.h" 39 #include "content/public/common/web_preferences.h"
(...skipping 29 matching lines...) Expand all
70 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the 69 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the
71 // root. VS warns when we inherit the WebWidgetClient method implementations 70 // root. VS warns when we inherit the WebWidgetClient method implementations
72 // from RenderWidget. It's safe to ignore that warning. 71 // from RenderWidget. It's safe to ignore that warning.
73 #pragma warning(disable: 4250) 72 #pragma warning(disable: 4250)
74 #endif 73 #endif
75 74
76 namespace blink { 75 namespace blink {
77 class WebApplicationCacheHost; 76 class WebApplicationCacheHost;
78 class WebDataSource; 77 class WebDataSource;
79 class WebDateTimeChooserCompletion; 78 class WebDateTimeChooserCompletion;
80 class WebDragData;
81 class WebGestureEvent; 79 class WebGestureEvent;
82 class WebIconURL; 80 class WebIconURL;
83 class WebImage; 81 class WebImage;
84 class WebMouseEvent; 82 class WebMouseEvent;
85 class WebSpeechRecognizer; 83 class WebSpeechRecognizer;
86 class WebStorageNamespace; 84 class WebStorageNamespace;
87 class WebURLRequest; 85 class WebURLRequest;
88 struct WebActiveWheelFlingParameters; 86 struct WebActiveWheelFlingParameters;
89 struct WebDateTimeChooserParams; 87 struct WebDateTimeChooserParams;
90 struct WebMediaPlayerAction; 88 struct WebMediaPlayerAction;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 const blink::WebString& main_text, 304 const blink::WebString& main_text,
307 blink::WebTextDirection main_text_hint, 305 blink::WebTextDirection main_text_hint,
308 const blink::WebString& sub_text, 306 const blink::WebString& sub_text,
309 blink::WebTextDirection hint) override; 307 blink::WebTextDirection hint) override;
310 void hideValidationMessage() override; 308 void hideValidationMessage() override;
311 void moveValidationMessage( 309 void moveValidationMessage(
312 const blink::WebRect& anchor_in_viewport) override; 310 const blink::WebRect& anchor_in_viewport) override;
313 void setStatusText(const blink::WebString& text) override; 311 void setStatusText(const blink::WebString& text) override;
314 void setMouseOverURL(const blink::WebURL& url) override; 312 void setMouseOverURL(const blink::WebURL& url) override;
315 void setKeyboardFocusURL(const blink::WebURL& url) override; 313 void setKeyboardFocusURL(const blink::WebURL& url) override;
316 void startDragging(blink::WebLocalFrame* frame,
317 const blink::WebDragData& data,
318 blink::WebDragOperationsMask mask,
319 const blink::WebImage& image,
320 const blink::WebPoint& imageOffset) override;
321 bool acceptsLoadDrops() override; 314 bool acceptsLoadDrops() override;
322 void focusNext() override; 315 void focusNext() override;
323 void focusPrevious() override; 316 void focusPrevious() override;
324 void focusedNodeChanged(const blink::WebNode& fromNode, 317 void focusedNodeChanged(const blink::WebNode& fromNode,
325 const blink::WebNode& toNode) override; 318 const blink::WebNode& toNode) override;
326 void didUpdateLayout() override; 319 void didUpdateLayout() override;
327 #if defined(OS_ANDROID) 320 #if defined(OS_ANDROID)
328 bool didTapMultipleTargets( 321 bool didTapMultipleTargets(
329 const blink::WebSize& inner_viewport_offset, 322 const blink::WebSize& inner_viewport_offset,
330 const blink::WebRect& touch_rect, 323 const blink::WebRect& touch_rect,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 CONNECTION_ERROR, 483 CONNECTION_ERROR,
491 }; 484 };
492 485
493 // RenderWidgetOwnerDelegate implementation ---------------------------------- 486 // RenderWidgetOwnerDelegate implementation ----------------------------------
494 487
495 void RenderWidgetDidSetColorProfile( 488 void RenderWidgetDidSetColorProfile(
496 const std::vector<char>& color_profile) override; 489 const std::vector<char>& color_profile) override;
497 void RenderWidgetFocusChangeComplete() override; 490 void RenderWidgetFocusChangeComplete() override;
498 bool DoesRenderWidgetHaveTouchEventHandlersAt( 491 bool DoesRenderWidgetHaveTouchEventHandlersAt(
499 const gfx::Point& point) const override; 492 const gfx::Point& point) const override;
500 bool RenderWidgetWillHandleGestureEvent(
501 const blink::WebGestureEvent& event) override;
502 bool RenderWidgetWillHandleMouseEvent( 493 bool RenderWidgetWillHandleMouseEvent(
503 const blink::WebMouseEvent& event) override; 494 const blink::WebMouseEvent& event) override;
504 495
505 // Old WebFrameClient implementations ---------------------------------------- 496 // Old WebFrameClient implementations ----------------------------------------
506 497
507 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the 498 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the
508 // WebFrameClient. However, many implementations of WebFrameClient methods 499 // WebFrameClient. However, many implementations of WebFrameClient methods
509 // still live here and are called from RenderFrameImpl. These implementations 500 // still live here and are called from RenderFrameImpl. These implementations
510 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. 501 // are to be moved to RenderFrameImpl <http://crbug.com/361761>.
511 502
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 837
847 // The SessionStorage namespace that we're assigned to has an ID, and that ID 838 // The SessionStorage namespace that we're assigned to has an ID, and that ID
848 // is passed to us upon creation. WebKit asks for this ID upon first use and 839 // is passed to us upon creation. WebKit asks for this ID upon first use and
849 // uses it whenever asking the browser process to allocate new storage areas. 840 // uses it whenever asking the browser process to allocate new storage areas.
850 int64_t session_storage_namespace_id_; 841 int64_t session_storage_namespace_id_;
851 842
852 // All the registered observers. We expect this list to be small, so vector 843 // All the registered observers. We expect this list to be small, so vector
853 // is fine. 844 // is fine.
854 base::ObserverList<RenderViewObserver> observers_; 845 base::ObserverList<RenderViewObserver> observers_;
855 846
856 // This field stores drag/drop related info for the event that is currently
857 // being handled. If the current event results in starting a drag/drop
858 // session, this info is sent to the browser along with other drag/drop info.
859 DragEventSourceInfo possible_drag_event_info_;
860
861 // NOTE: stats_collection_observer_ should be the last members because their 847 // NOTE: stats_collection_observer_ should be the last members because their
862 // constructors call the AddObservers method of RenderViewImpl. 848 // constructors call the AddObservers method of RenderViewImpl.
863 std::unique_ptr<StatsCollectionObserver> stats_collection_observer_; 849 std::unique_ptr<StatsCollectionObserver> stats_collection_observer_;
864 850
865 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap; 851 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap;
866 BitmapMap disambiguation_bitmaps_; 852 BitmapMap disambiguation_bitmaps_;
867 853
868 bool has_added_input_handler_; 854 bool has_added_input_handler_;
869 855
870 // --------------------------------------------------------------------------- 856 // ---------------------------------------------------------------------------
871 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 857 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
872 // sections rather than throwing it randomly at the end. If you're adding a 858 // sections rather than throwing it randomly at the end. If you're adding a
873 // bunch of stuff, you should probably create a helper class and put your 859 // bunch of stuff, you should probably create a helper class and put your
874 // data and methods on that to avoid bloating RenderView more. You can 860 // data and methods on that to avoid bloating RenderView more. You can
875 // use the Observer interface to filter IPC messages and receive frame change 861 // use the Observer interface to filter IPC messages and receive frame change
876 // notifications. 862 // notifications.
877 // --------------------------------------------------------------------------- 863 // ---------------------------------------------------------------------------
878 864
879 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 865 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
880 }; 866 };
881 867
882 } // namespace content 868 } // namespace content
883 869
884 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 870 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_widget_host.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698