| OLD | NEW |
| 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 #include "chrome/browser/tab_contents/web_contents_view_win.h" | 5 #include "chrome/browser/tab_contents/web_contents_view_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 find_bar_->OnFindReply(request_id, number_of_matches, selection_rect, | 311 find_bar_->OnFindReply(request_id, number_of_matches, selection_rect, |
| 312 active_match_ordinal, final_update); | 312 active_match_ordinal, final_update); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 void WebContentsViewWin::ShowContextMenu( | 316 void WebContentsViewWin::ShowContextMenu( |
| 317 const ViewHostMsg_ContextMenu_Params& params) { | 317 const ViewHostMsg_ContextMenu_Params& params) { |
| 318 RenderViewContextMenuController menu_controller(web_contents_, params); | 318 RenderViewContextMenuController menu_controller(web_contents_, params); |
| 319 RenderViewContextMenu menu(&menu_controller, | 319 RenderViewContextMenu menu(&menu_controller, |
| 320 GetHWND(), | 320 GetHWND(), |
| 321 params.type, | 321 params.node, |
| 322 params.misspelled_word, | 322 params.misspelled_word, |
| 323 params.dictionary_suggestions, | 323 params.dictionary_suggestions, |
| 324 web_contents_->profile()); | 324 web_contents_->profile()); |
| 325 | 325 |
| 326 POINT screen_pt = { params.x, params.y }; | 326 POINT screen_pt = { params.x, params.y }; |
| 327 MapWindowPoints(GetHWND(), HWND_DESKTOP, &screen_pt, 1); | 327 MapWindowPoints(GetHWND(), HWND_DESKTOP, &screen_pt, 1); |
| 328 | 328 |
| 329 // Enable recursive tasks on the message loop so we can get updates while | 329 // Enable recursive tasks on the message loop so we can get updates while |
| 330 // the context menu is being displayed. | 330 // the context menu is being displayed. |
| 331 bool old_state = MessageLoop::current()->NestableTasksAllowed(); | 331 bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } | 647 } |
| 648 return false; | 648 return false; |
| 649 } | 649 } |
| 650 | 650 |
| 651 void WebContentsViewWin::WheelZoom(int distance) { | 651 void WebContentsViewWin::WheelZoom(int distance) { |
| 652 if (web_contents_->delegate()) { | 652 if (web_contents_->delegate()) { |
| 653 bool zoom_in = distance > 0; | 653 bool zoom_in = distance > 0; |
| 654 web_contents_->delegate()->ContentsZoomChange(zoom_in); | 654 web_contents_->delegate()->ContentsZoomChange(zoom_in); |
| 655 } | 655 } |
| 656 } | 656 } |
| OLD | NEW |