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

Side by Side Diff: content/browser/web_contents/web_contents_view_mus.h

Issue 2505113002: Drag-and-drop: Target drag messages to specific RenderWidgets. (Closed)
Patch Set: Small fix. 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_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 13 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
14 #include "content/browser/web_contents/web_contents_view.h" 14 #include "content/browser/web_contents/web_contents_view.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/drag_event_source_info.h" 16 #include "content/common/drag_event_source_info.h"
17 #include "services/ui/public/cpp/scoped_window_ptr.h" 17 #include "services/ui/public/cpp/scoped_window_ptr.h"
18 #include "services/ui/public/cpp/window.h" 18 #include "services/ui/public/cpp/window.h"
19 #include "ui/aura/window_delegate.h" 19 #include "ui/aura/window_delegate.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 class RenderWidgetHostImpl;
23 class WebContents; 24 class WebContents;
24 class WebContentsImpl; 25 class WebContentsImpl;
25 class WebContentsViewDelegate; 26 class WebContentsViewDelegate;
26 27
27 class WebContentsViewMus : public WebContentsView, 28 class WebContentsViewMus : public WebContentsView,
28 public RenderViewHostDelegateView, 29 public RenderViewHostDelegateView,
29 public aura::WindowDelegate { 30 public aura::WindowDelegate {
30 public: 31 public:
31 // The corresponding WebContentsImpl is passed in the constructor, and manages 32 // The corresponding WebContentsImpl is passed in the constructor, and manages
32 // our lifetime. This doesn't need to be the case, but is this way currently 33 // our lifetime. This doesn't need to be the case, but is this way currently
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void CloseTabAfterEventTracking() override; 74 void CloseTabAfterEventTracking() override;
74 #endif 75 #endif
75 76
76 // Backend implementation of RenderViewHostDelegateView. 77 // Backend implementation of RenderViewHostDelegateView.
77 void ShowContextMenu(RenderFrameHost* render_frame_host, 78 void ShowContextMenu(RenderFrameHost* render_frame_host,
78 const ContextMenuParams& params) override; 79 const ContextMenuParams& params) override;
79 void StartDragging(const DropData& drop_data, 80 void StartDragging(const DropData& drop_data,
80 blink::WebDragOperationsMask allowed_ops, 81 blink::WebDragOperationsMask allowed_ops,
81 const gfx::ImageSkia& image, 82 const gfx::ImageSkia& image,
82 const gfx::Vector2d& image_offset, 83 const gfx::Vector2d& image_offset,
83 const DragEventSourceInfo& event_info) override; 84 const DragEventSourceInfo& event_info,
85 RenderWidgetHostImpl* source_rwh) override;
84 void UpdateDragCursor(blink::WebDragOperation operation) override; 86 void UpdateDragCursor(blink::WebDragOperation operation) override;
85 void GotFocus() override; 87 void GotFocus() override;
86 void TakeFocus(bool reverse) override; 88 void TakeFocus(bool reverse) override;
87 89
88 // Overridden from aura::WindowDelegate: 90 // Overridden from aura::WindowDelegate:
89 gfx::Size GetMinimumSize() const override; 91 gfx::Size GetMinimumSize() const override;
90 gfx::Size GetMaximumSize() const override; 92 gfx::Size GetMaximumSize() const override;
91 void OnBoundsChanged(const gfx::Rect& old_bounds, 93 void OnBoundsChanged(const gfx::Rect& old_bounds,
92 const gfx::Rect& new_bounds) override; 94 const gfx::Rect& new_bounds) override;
93 gfx::NativeCursor GetCursor(const gfx::Point& point) override; 95 gfx::NativeCursor GetCursor(const gfx::Point& point) override;
(...skipping 17 matching lines...) Expand all
111 std::unique_ptr<WebContentsViewDelegate> delegate_; 113 std::unique_ptr<WebContentsViewDelegate> delegate_;
112 std::unique_ptr<aura::Window> aura_window_; 114 std::unique_ptr<aura::Window> aura_window_;
113 std::unique_ptr<ui::ScopedWindowPtr> mus_window_; 115 std::unique_ptr<ui::ScopedWindowPtr> mus_window_;
114 116
115 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMus); 117 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMus);
116 }; 118 };
117 119
118 } // namespace content 120 } // namespace content
119 121
120 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_ 122 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698