2010-10-22 02:13:43 +02:00
|
|
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
2010-10-03 23:04:50 +02:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef _BROWSER_DRAG_DELEGATE_H
|
|
|
|
#define _BROWSER_DRAG_DELEGATE_H
|
|
|
|
|
2010-10-22 02:13:43 +02:00
|
|
|
#include "app/win/drag_source.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
namespace WebKit {
|
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
2010-10-22 02:13:43 +02:00
|
|
|
// A class that implements app::win::DragSource for the browser webview
|
|
|
|
// delegate.
|
|
|
|
class BrowserDragDelegate : public app::win::DragSource {
|
2010-10-03 23:04:50 +02:00
|
|
|
public:
|
|
|
|
BrowserDragDelegate(HWND source_hwnd, WebKit::WebView* webview)
|
2010-10-22 02:13:43 +02:00
|
|
|
: app::win::DragSource(),
|
2010-10-03 23:04:50 +02:00
|
|
|
source_hwnd_(source_hwnd),
|
|
|
|
webview_(webview) { }
|
|
|
|
|
|
|
|
protected:
|
2010-10-22 02:13:43 +02:00
|
|
|
// app::win::DragSource
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual void OnDragSourceCancel();
|
|
|
|
virtual void OnDragSourceDrop();
|
|
|
|
virtual void OnDragSourceMove();
|
|
|
|
|
|
|
|
private:
|
|
|
|
WebKit::WebView* webview_;
|
|
|
|
|
|
|
|
// A HWND for the source we are associated with, used for translating
|
|
|
|
// mouse coordinates from screen to client coordinates.
|
|
|
|
HWND source_hwnd_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_DRAG_DELEGATE_H
|
|
|
|
|