Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: chrome/browser/views/tab_contents/tab_contents_view_win.h

Issue 668125: Basic DragImage implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_
6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_
7 7
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/timer.h" 10 #include "base/timer.h"
11 #include "chrome/browser/tab_contents/tab_contents_view.h" 11 #include "chrome/browser/tab_contents/tab_contents_view.h"
12 #include "views/widget/widget_win.h" 12 #include "views/widget/widget_win.h"
13 13
14 class RenderViewContextMenuWin; 14 class RenderViewContextMenuWin;
15 class SadTabView; 15 class SadTabView;
16 class SkBitmap;
16 class TabContentsDragWin; 17 class TabContentsDragWin;
17 struct WebDropData; 18 struct WebDropData;
18 class WebDragSource; 19 class WebDragSource;
19 class WebDropTarget; 20 class WebDropTarget;
21 namespace gfx {
22 class Point;
23 }
20 24
21 // Windows-specific implementation of the TabContentsView. It is a HWND that 25 // Windows-specific implementation of the TabContentsView. It is a HWND that
22 // contains all of the contents of the tab and associated child views. 26 // contains all of the contents of the tab and associated child views.
23 class TabContentsViewWin : public TabContentsView, 27 class TabContentsViewWin : public TabContentsView,
24 public views::WidgetWin { 28 public views::WidgetWin {
25 public: 29 public:
26 // The corresponding TabContents is passed in the constructor, and manages our 30 // The corresponding TabContents is passed in the constructor, and manages our
27 // lifetime. This doesn't need to be the case, but is this way currently 31 // lifetime. This doesn't need to be the case, but is this way currently
28 // because that's what was easiest when they were split. 32 // because that's what was easiest when they were split.
29 explicit TabContentsViewWin(TabContents* tab_contents); 33 explicit TabContentsViewWin(TabContents* tab_contents);
(...skipping 18 matching lines...) Expand all
48 virtual void Focus(); 52 virtual void Focus();
49 virtual void SetInitialFocus(); 53 virtual void SetInitialFocus();
50 virtual void StoreFocus(); 54 virtual void StoreFocus();
51 virtual void RestoreFocus(); 55 virtual void RestoreFocus();
52 virtual bool IsDoingDrag() const; 56 virtual bool IsDoingDrag() const;
53 virtual void CancelDragAndCloseTab(); 57 virtual void CancelDragAndCloseTab();
54 58
55 // Backend implementation of RenderViewHostDelegate::View. 59 // Backend implementation of RenderViewHostDelegate::View.
56 virtual void ShowContextMenu(const ContextMenuParams& params); 60 virtual void ShowContextMenu(const ContextMenuParams& params);
57 virtual void StartDragging(const WebDropData& drop_data, 61 virtual void StartDragging(const WebDropData& drop_data,
58 WebKit::WebDragOperationsMask operations); 62 WebKit::WebDragOperationsMask operations,
63 const SkBitmap& image,
64 const gfx::Point& image_offset);
59 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); 65 virtual void UpdateDragCursor(WebKit::WebDragOperation operation);
60 virtual void GotFocus(); 66 virtual void GotFocus();
61 virtual void TakeFocus(bool reverse); 67 virtual void TakeFocus(bool reverse);
62 68
63 // WidgetWin overridde. 69 // WidgetWin overridde.
64 virtual views::FocusManager* GetFocusManager(); 70 virtual views::FocusManager* GetFocusManager();
65 71
66 void EndDragging(); 72 void EndDragging();
67 73
68 WebDropTarget* drop_target() const { return drop_target_.get(); } 74 WebDropTarget* drop_target() const { return drop_target_.get(); }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Used to close the tab after the stack has unwound. 136 // Used to close the tab after the stack has unwound.
131 base::OneShotTimer<TabContentsViewWin> close_tab_timer_; 137 base::OneShotTimer<TabContentsViewWin> close_tab_timer_;
132 138
133 // Used to handle the drag-and-drop. 139 // Used to handle the drag-and-drop.
134 scoped_refptr<TabContentsDragWin> drag_handler_; 140 scoped_refptr<TabContentsDragWin> drag_handler_;
135 141
136 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin); 142 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin);
137 }; 143 };
138 144
139 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ 145 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/views/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698