| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void TabContentsViewWin::CancelDragAndCloseTab() { | 278 void TabContentsViewWin::CancelDragAndCloseTab() { |
| 279 DCHECK(IsDoingDrag()); | 279 DCHECK(IsDoingDrag()); |
| 280 // We can't close the tab while we're in the drag and | 280 // We can't close the tab while we're in the drag and |
| 281 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel | 281 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel |
| 282 // the drag and when the drag nested message loop ends, close the tab. | 282 // the drag and when the drag nested message loop ends, close the tab. |
| 283 drag_handler_->CancelDrag(); | 283 drag_handler_->CancelDrag(); |
| 284 close_tab_after_drag_ends_ = true; | 284 close_tab_after_drag_ends_ = true; |
| 285 } | 285 } |
| 286 | 286 |
| 287 void TabContentsViewWin::UpdateDragCursor(WebDragOperation operation) { | 287 void TabContentsViewWin::UpdateDragCursor(WebDragOperation operation) { |
| 288 drop_target_->set_is_drop_target(operation != WebDragOperationNone); | 288 drop_target_->set_drag_cursor(operation); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void TabContentsViewWin::GotFocus() { | 291 void TabContentsViewWin::GotFocus() { |
| 292 if (tab_contents()->delegate()) | 292 if (tab_contents()->delegate()) |
| 293 tab_contents()->delegate()->TabContentsFocused(tab_contents()); | 293 tab_contents()->delegate()->TabContentsFocused(tab_contents()); |
| 294 } | 294 } |
| 295 | 295 |
| 296 void TabContentsViewWin::TakeFocus(bool reverse) { | 296 void TabContentsViewWin::TakeFocus(bool reverse) { |
| 297 if (!tab_contents()->delegate()->TakeFocus(reverse)) { | 297 if (!tab_contents()->delegate()->TakeFocus(reverse)) { |
| 298 views::FocusManager* focus_manager = | 298 views::FocusManager* focus_manager = |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 } | 557 } |
| 558 return false; | 558 return false; |
| 559 } | 559 } |
| 560 | 560 |
| 561 void TabContentsViewWin::WheelZoom(int distance) { | 561 void TabContentsViewWin::WheelZoom(int distance) { |
| 562 if (tab_contents()->delegate()) { | 562 if (tab_contents()->delegate()) { |
| 563 bool zoom_in = distance > 0; | 563 bool zoom_in = distance > 0; |
| 564 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 564 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 565 } | 565 } |
| 566 } | 566 } |
| OLD | NEW |