| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 13 #include "ui/base/dragdrop/drag_source.h" | 13 #include "ui/base/dragdrop/drag_source.h" |
| 14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 15 #include "ui/gfx/point.h" | 15 #include "ui/gfx/point.h" |
| 16 | 16 |
| 17 namespace content { |
| 17 class RenderViewHost; | 18 class RenderViewHost; |
| 18 | |
| 19 namespace content { | |
| 20 class WebContents; | 19 class WebContents; |
| 21 } | 20 } |
| 22 | 21 |
| 23 // An IDropSource implementation for a TabContents. Handles notifications sent | 22 // An IDropSource implementation for a TabContents. Handles notifications sent |
| 24 // by an active drag-drop operation as the user mouses over other drop targets | 23 // by an active drag-drop operation as the user mouses over other drop targets |
| 25 // on their system. This object tells Windows whether or not the drag should | 24 // on their system. This object tells Windows whether or not the drag should |
| 26 // continue, and supplies the appropriate cursors. | 25 // continue, and supplies the appropriate cursors. |
| 27 class CONTENT_EXPORT WebDragSource : public ui::DragSource, | 26 class CONTENT_EXPORT WebDragSource : public ui::DragSource, |
| 28 public content::NotificationObserver { | 27 public content::NotificationObserver { |
| 29 public: | 28 public: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 // OnDragSourceDrop schedules its main work to be done after IDropTarget::Drop | 51 // OnDragSourceDrop schedules its main work to be done after IDropTarget::Drop |
| 53 // by posting a task to this function. | 52 // by posting a task to this function. |
| 54 void DelayedOnDragSourceDrop(); | 53 void DelayedOnDragSourceDrop(); |
| 55 | 54 |
| 56 // Keep a reference to the window so we can translate the cursor position. | 55 // Keep a reference to the window so we can translate the cursor position. |
| 57 gfx::NativeWindow source_wnd_; | 56 gfx::NativeWindow source_wnd_; |
| 58 | 57 |
| 59 // We use this as a channel to the renderer to tell it about various drag | 58 // We use this as a channel to the renderer to tell it about various drag |
| 60 // drop events that it needs to know about (such as when a drag operation it | 59 // drop events that it needs to know about (such as when a drag operation it |
| 61 // initiated terminates). | 60 // initiated terminates). |
| 62 RenderViewHost* render_view_host_; | 61 content::RenderViewHost* render_view_host_; |
| 63 | 62 |
| 64 content::NotificationRegistrar registrar_; | 63 content::NotificationRegistrar registrar_; |
| 65 | 64 |
| 66 DWORD effect_; | 65 DWORD effect_; |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(WebDragSource); | 67 DISALLOW_COPY_AND_ASSIGN(WebDragSource); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 70 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
| OLD | NEW |