| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/gfx/native_widget_types.h" | 9 #include "base/gfx/native_widget_types.h" |
| 10 #include "base/gfx/point.h" | 10 #include "base/gfx/point.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // continue, and supplies the appropriate cursors. | 28 // continue, and supplies the appropriate cursors. |
| 29 // | 29 // |
| 30 class WebDragSource : public BaseDragSource { | 30 class WebDragSource : public BaseDragSource { |
| 31 public: | 31 public: |
| 32 // Create a new DragSource for a given HWND and RenderViewHost. | 32 // Create a new DragSource for a given HWND and RenderViewHost. |
| 33 WebDragSource(gfx::NativeWindow source_wnd, RenderViewHost* render_view_host); | 33 WebDragSource(gfx::NativeWindow source_wnd, RenderViewHost* render_view_host); |
| 34 virtual ~WebDragSource() { } | 34 virtual ~WebDragSource() { } |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 // BaseDragSource | 37 // BaseDragSource |
| 38 virtual void OnDragSourceCancel(); |
| 38 virtual void OnDragSourceDrop(); | 39 virtual void OnDragSourceDrop(); |
| 39 virtual void OnDragSourceMove(); | 40 virtual void OnDragSourceMove(); |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 // Cannot construct thusly. | 43 // Cannot construct thusly. |
| 43 WebDragSource(); | 44 WebDragSource(); |
| 44 | 45 |
| 45 // Keep a reference to the window so we can translate the cursor position. | 46 // Keep a reference to the window so we can translate the cursor position. |
| 46 gfx::NativeWindow source_wnd_; | 47 gfx::NativeWindow source_wnd_; |
| 47 | 48 |
| 48 // We use this as a channel to the renderer to tell it about various drag | 49 // We use this as a channel to the renderer to tell it about various drag |
| 49 // drop events that it needs to know about (such as when a drag operation it | 50 // drop events that it needs to know about (such as when a drag operation it |
| 50 // initiated terminates). | 51 // initiated terminates). |
| 51 RenderViewHost* render_view_host_; | 52 RenderViewHost* render_view_host_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(WebDragSource); | 54 DISALLOW_COPY_AND_ASSIGN(WebDragSource); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ | 57 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_ |
| OLD | NEW |