| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DROP_TARGET_WIN_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_WIN_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_WIN_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "app/win/drop_target.h" | |
| 10 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
| 11 #include "ui/base/dragdrop/drop_target.h" |
| 12 | 12 |
| 13 class InterstitialDropTarget; | 13 class InterstitialDropTarget; |
| 14 class RenderViewHost; | 14 class RenderViewHost; |
| 15 class TabContents; | 15 class TabContents; |
| 16 | 16 |
| 17 // A helper object that provides drop capabilities to a TabContents. The | 17 // A helper object that provides drop capabilities to a TabContents. The |
| 18 // DropTarget handles drags that enter the region of the TabContents by | 18 // DropTarget handles drags that enter the region of the TabContents by |
| 19 // passing on the events to the renderer. | 19 // passing on the events to the renderer. |
| 20 class WebDropTarget : public app::win::DropTarget { | 20 class WebDropTarget : public ui::DropTarget { |
| 21 public: | 21 public: |
| 22 // Create a new WebDropTarget associating it with the given HWND and | 22 // Create a new WebDropTarget associating it with the given HWND and |
| 23 // TabContents. | 23 // TabContents. |
| 24 WebDropTarget(HWND source_hwnd, TabContents* contents); | 24 WebDropTarget(HWND source_hwnd, TabContents* contents); |
| 25 virtual ~WebDropTarget(); | 25 virtual ~WebDropTarget(); |
| 26 | 26 |
| 27 void set_drag_cursor(WebKit::WebDragOperation op) { | 27 void set_drag_cursor(WebKit::WebDragOperation op) { |
| 28 drag_cursor_ = op; | 28 drag_cursor_ = op; |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 61 WebKit::WebDragOperation drag_cursor_; | 61 WebKit::WebDragOperation drag_cursor_; |
| 62 | 62 |
| 63 // A special drop target handler for when we try to d&d while an interstitial | 63 // A special drop target handler for when we try to d&d while an interstitial |
| 64 // page is showing. | 64 // page is showing. |
| 65 scoped_ptr<InterstitialDropTarget> interstitial_drop_target_; | 65 scoped_ptr<InterstitialDropTarget> interstitial_drop_target_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(WebDropTarget); | 67 DISALLOW_COPY_AND_ASSIGN(WebDropTarget); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_WIN_H_ | 70 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_WIN_H_ |
| OLD | NEW |