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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2475443003: Drag-and-drop: Move startDrag out of WebView/RenderView. (Closed)
Patch Set: 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
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 15 matching lines...) Expand all
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "cc/resources/shared_bitmap.h" 27 #include "cc/resources/shared_bitmap.h"
28 #include "content/browser/renderer_host/event_with_latency_info.h" 28 #include "content/browser/renderer_host/event_with_latency_info.h"
29 #include "content/browser/renderer_host/input/input_ack_handler.h" 29 #include "content/browser/renderer_host/input/input_ack_handler.h"
30 #include "content/browser/renderer_host/input/input_router_client.h" 30 #include "content/browser/renderer_host/input/input_router_client.h"
31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
32 #include "content/browser/renderer_host/input/synthetic_gesture.h" 32 #include "content/browser/renderer_host/input/synthetic_gesture.h"
33 #include "content/browser/renderer_host/input/touch_emulator_client.h" 33 #include "content/browser/renderer_host/input/touch_emulator_client.h"
34 #include "content/browser/renderer_host/render_widget_host_delegate.h" 34 #include "content/browser/renderer_host/render_widget_host_delegate.h"
35 #include "content/browser/renderer_host/render_widget_host_view_base.h" 35 #include "content/browser/renderer_host/render_widget_host_view_base.h"
36 #include "content/common/drag_event_source_info.h"
36 #include "content/common/input/input_event_ack_state.h" 37 #include "content/common/input/input_event_ack_state.h"
37 #include "content/common/input/synthetic_gesture_packet.h" 38 #include "content/common/input/synthetic_gesture_packet.h"
38 #include "content/common/view_message_enums.h" 39 #include "content/common/view_message_enums.h"
39 #include "content/public/browser/readback_types.h" 40 #include "content/public/browser/readback_types.h"
40 #include "content/public/browser/render_widget_host.h" 41 #include "content/public/browser/render_widget_host.h"
41 #include "content/public/common/page_zoom.h" 42 #include "content/public/common/page_zoom.h"
42 #include "ipc/ipc_listener.h" 43 #include "ipc/ipc_listener.h"
43 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 44 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
44 #include "ui/base/ime/text_input_mode.h" 45 #include "ui/base/ime/text_input_mode.h"
45 #include "ui/base/ime/text_input_type.h" 46 #include "ui/base/ime/text_input_type.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 559
559 // The View associated with the RenderWidgetHost. The lifetime of this object 560 // The View associated with the RenderWidgetHost. The lifetime of this object
560 // is associated with the lifetime of the Render process. If the Renderer 561 // is associated with the lifetime of the Render process. If the Renderer
561 // crashes, its View is destroyed and this pointer becomes NULL, even though 562 // crashes, its View is destroyed and this pointer becomes NULL, even though
562 // render_view_host_ lives on to load another URL (creating a new View while 563 // render_view_host_ lives on to load another URL (creating a new View while
563 // doing so). 564 // doing so).
564 base::WeakPtr<RenderWidgetHostViewBase> view_; 565 base::WeakPtr<RenderWidgetHostViewBase> view_;
565 566
566 private: 567 private:
567 friend class MockRenderWidgetHost; 568 friend class MockRenderWidgetHost;
569 friend class TestRenderViewHost;
568 570
569 // Tell this object to destroy itself. If |also_delete| is specified, the 571 // Tell this object to destroy itself. If |also_delete| is specified, the
570 // destructor is called as well. 572 // destructor is called as well.
571 void Destroy(bool also_delete); 573 void Destroy(bool also_delete);
572 574
573 // Called by |hang_monitor_timeout_| on delayed response from the renderer. 575 // Called by |hang_monitor_timeout_| on delayed response from the renderer.
574 void RendererIsUnresponsive(); 576 void RendererIsUnresponsive();
575 577
576 // Called by |new_content_rendering_timeout_| if a renderer has loaded new 578 // Called by |new_content_rendering_timeout_| if a renderer has loaded new
577 // content but failed to produce a compositor frame in a defined time. 579 // content but failed to produce a compositor frame in a defined time.
(...skipping 26 matching lines...) Expand all
604 bool privileged); 606 bool privileged);
605 void OnUnlockMouse(); 607 void OnUnlockMouse();
606 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, 608 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels,
607 const gfx::Size& size, 609 const gfx::Size& size,
608 const cc::SharedBitmapId& id); 610 const cc::SharedBitmapId& id);
609 void OnSelectionBoundsChanged( 611 void OnSelectionBoundsChanged(
610 const ViewHostMsg_SelectionBounds_Params& params); 612 const ViewHostMsg_SelectionBounds_Params& params);
611 void OnForwardCompositorProto(const std::vector<uint8_t>& proto); 613 void OnForwardCompositorProto(const std::vector<uint8_t>& proto);
612 void OnSetNeedsBeginFrames(bool needs_begin_frames); 614 void OnSetNeedsBeginFrames(bool needs_begin_frames);
613 void OnHittestData(const FrameHostMsg_HittestData_Params& params); 615 void OnHittestData(const FrameHostMsg_HittestData_Params& params);
616 void OnStartDragging(const DropData& drop_data,
617 blink::WebDragOperationsMask operations_allowed,
618 const SkBitmap& bitmap,
619 const gfx::Vector2d& bitmap_offset_in_dip,
620 const DragEventSourceInfo& event_info);
614 621
615 // Called (either immediately or asynchronously) after we're done with our 622 // Called (either immediately or asynchronously) after we're done with our
616 // BackingStore and can send an ACK to the renderer so it can paint onto it 623 // BackingStore and can send an ACK to the renderer so it can paint onto it
617 // again. 624 // again.
618 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, 625 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params,
619 const base::TimeTicks& paint_start); 626 const base::TimeTicks& paint_start);
620 627
621 // Give key press listeners a chance to handle this key press. This allow 628 // Give key press listeners a chance to handle this key press. This allow
622 // widgets that don't have focus to still handle key presses. 629 // widgets that don't have focus to still handle key presses.
623 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); 630 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 #endif 869 #endif
863 870
864 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 871 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
865 872
866 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 873 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
867 }; 874 };
868 875
869 } // namespace content 876 } // namespace content
870 877
871 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 878 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698