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

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

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) 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 #include "chrome/browser/views/tab_contents/tab_contents_view_win.h" 5 #include "chrome/browser/views/tab_contents/tab_contents_view_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "app/gfx/canvas_paint.h" 9 #include "app/gfx/canvas_paint.h"
10 #include "app/os_exchange_data.h" 10 #include "app/os_exchange_data.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 gfx::NativeWindow TabContentsViewWin::GetTopLevelNativeWindow() const { 119 gfx::NativeWindow TabContentsViewWin::GetTopLevelNativeWindow() const {
120 return ::GetAncestor(GetNativeView(), GA_ROOT); 120 return ::GetAncestor(GetNativeView(), GA_ROOT);
121 } 121 }
122 122
123 void TabContentsViewWin::GetContainerBounds(gfx::Rect* out) const { 123 void TabContentsViewWin::GetContainerBounds(gfx::Rect* out) const {
124 GetBounds(out, false); 124 GetBounds(out, false);
125 } 125 }
126 126
127 void TabContentsViewWin::StartDragging(const WebDropData& drop_data, 127 void TabContentsViewWin::StartDragging(const WebDropData& drop_data,
128 WebDragOperationsMask ops) { 128 WebDragOperationsMask ops,
129 const SkBitmap& image,
130 const gfx::Point& image_offset) {
129 drag_handler_ = new TabContentsDragWin(this); 131 drag_handler_ = new TabContentsDragWin(this);
132 // TODO(estade): make use of |image| and |image_offset|.
130 drag_handler_->StartDragging(drop_data, ops); 133 drag_handler_->StartDragging(drop_data, ops);
131 } 134 }
132 135
133 void TabContentsViewWin::EndDragging() { 136 void TabContentsViewWin::EndDragging() {
134 if (close_tab_after_drag_ends_) { 137 if (close_tab_after_drag_ends_) {
135 close_tab_timer_.Start(base::TimeDelta::FromMilliseconds(0), this, 138 close_tab_timer_.Start(base::TimeDelta::FromMilliseconds(0), this,
136 &TabContentsViewWin::CloseTab); 139 &TabContentsViewWin::CloseTab);
137 } 140 }
138 141
139 if (tab_contents()->render_view_host()) 142 if (tab_contents()->render_view_host())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 556 }
554 return false; 557 return false;
555 } 558 }
556 559
557 void TabContentsViewWin::WheelZoom(int distance) { 560 void TabContentsViewWin::WheelZoom(int distance) {
558 if (tab_contents()->delegate()) { 561 if (tab_contents()->delegate()) {
559 bool zoom_in = distance > 0; 562 bool zoom_in = distance > 0;
560 tab_contents()->delegate()->ContentsZoomChange(zoom_in); 563 tab_contents()->delegate()->ContentsZoomChange(zoom_in);
561 } 564 }
562 } 565 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698