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 #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 Loading... |
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) { | |
131 drag_handler_ = new TabContentsDragWin(this); | 129 drag_handler_ = new TabContentsDragWin(this); |
132 // TODO(estade): make use of |image| and |image_offset|. | |
133 drag_handler_->StartDragging(drop_data, ops); | 130 drag_handler_->StartDragging(drop_data, ops); |
134 } | 131 } |
135 | 132 |
136 void TabContentsViewWin::EndDragging() { | 133 void TabContentsViewWin::EndDragging() { |
137 if (close_tab_after_drag_ends_) { | 134 if (close_tab_after_drag_ends_) { |
138 close_tab_timer_.Start(base::TimeDelta::FromMilliseconds(0), this, | 135 close_tab_timer_.Start(base::TimeDelta::FromMilliseconds(0), this, |
139 &TabContentsViewWin::CloseTab); | 136 &TabContentsViewWin::CloseTab); |
140 } | 137 } |
141 | 138 |
142 if (tab_contents()->render_view_host()) | 139 if (tab_contents()->render_view_host()) |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } | 554 } |
558 return false; | 555 return false; |
559 } | 556 } |
560 | 557 |
561 void TabContentsViewWin::WheelZoom(int distance) { | 558 void TabContentsViewWin::WheelZoom(int distance) { |
562 if (tab_contents()->delegate()) { | 559 if (tab_contents()->delegate()) { |
563 bool zoom_in = distance > 0; | 560 bool zoom_in = distance > 0; |
564 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 561 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
565 } | 562 } |
566 } | 563 } |
OLD | NEW |