Add ability for NetLogLogger to gather data from more than just NetLog
[chromium-blink-merge.git] / ui / views / widget / desktop_aura / desktop_drag_drop_client_win.h
blobc46e2429da5cb3ab5389967fd402d26949328eec
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_
8 #include <wrl/client.h>
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "ui/views/views_export.h"
14 #include "ui/wm/public/drag_drop_client.h"
16 namespace ui {
17 class DragSourceWin;
20 namespace views {
21 class DesktopDropTargetWin;
23 class VIEWS_EXPORT DesktopDragDropClientWin
24 : public aura::client::DragDropClient {
25 public:
26 DesktopDragDropClientWin(aura::Window* root_window, HWND window);
27 virtual ~DesktopDragDropClientWin();
29 // Overridden from aura::client::DragDropClient:
30 virtual int StartDragAndDrop(
31 const ui::OSExchangeData& data,
32 aura::Window* root_window,
33 aura::Window* source_window,
34 const gfx::Point& screen_location,
35 int operation,
36 ui::DragDropTypes::DragEventSource source) override;
37 virtual void DragUpdate(aura::Window* target,
38 const ui::LocatedEvent& event) override;
39 virtual void Drop(aura::Window* target,
40 const ui::LocatedEvent& event) override;
41 virtual void DragCancel() override;
42 virtual bool IsDragDropInProgress() override;
44 void OnNativeWidgetDestroying(HWND window);
46 private:
47 bool drag_drop_in_progress_;
49 int drag_operation_;
51 Microsoft::WRL::ComPtr<ui::DragSourceWin> drag_source_;
53 scoped_refptr<DesktopDropTargetWin> drop_target_;
55 base::WeakPtrFactory<DesktopDragDropClientWin> weak_factory_;
57 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin);
60 } // namespace views
62 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_