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/web_contents_view_win.h" | 5 #include "chrome/browser/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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // Enable recursive tasks on the message loop so we can get updates while | 319 // Enable recursive tasks on the message loop so we can get updates while |
320 // the context menu is being displayed. | 320 // the context menu is being displayed. |
321 bool old_state = MessageLoop::current()->NestableTasksAllowed(); | 321 bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
322 MessageLoop::current()->SetNestableTasksAllowed(true); | 322 MessageLoop::current()->SetNestableTasksAllowed(true); |
323 menu.RunMenuAt(screen_pt.x, screen_pt.y); | 323 menu.RunMenuAt(screen_pt.x, screen_pt.y); |
324 MessageLoop::current()->SetNestableTasksAllowed(old_state); | 324 MessageLoop::current()->SetNestableTasksAllowed(old_state); |
325 } | 325 } |
326 | 326 |
327 WebContents* WebContentsViewWin::CreateNewWindowInternal( | 327 WebContents* WebContentsViewWin::CreateNewWindowInternal( |
328 int route_id, | 328 int route_id, |
329 HANDLE modal_dialog_event) { | 329 base::WaitableEvent* modal_dialog_event) { |
330 // Create the new web contents. This will automatically create the new | 330 // Create the new web contents. This will automatically create the new |
331 // WebContentsView. In the future, we may want to create the view separately. | 331 // WebContentsView. In the future, we may want to create the view separately. |
332 WebContents* new_contents = | 332 WebContents* new_contents = |
333 new WebContents(web_contents_->profile(), | 333 new WebContents(web_contents_->profile(), |
334 web_contents_->GetSiteInstance(), | 334 web_contents_->GetSiteInstance(), |
335 web_contents_->render_view_factory_, | 335 web_contents_->render_view_factory_, |
336 route_id, | 336 route_id, |
337 modal_dialog_event); | 337 modal_dialog_event); |
338 new_contents->SetupController(web_contents_->profile()); | 338 new_contents->SetupController(web_contents_->profile()); |
339 WebContentsView* new_view = new_contents->view(); | 339 WebContentsView* new_view = new_contents->view(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 } | 637 } |
638 return false; | 638 return false; |
639 } | 639 } |
640 | 640 |
641 void WebContentsViewWin::WheelZoom(int distance) { | 641 void WebContentsViewWin::WheelZoom(int distance) { |
642 if (web_contents_->delegate()) { | 642 if (web_contents_->delegate()) { |
643 bool zoom_in = distance > 0; | 643 bool zoom_in = distance > 0; |
644 web_contents_->delegate()->ContentsZoomChange(zoom_in); | 644 web_contents_->delegate()->ContentsZoomChange(zoom_in); |
645 } | 645 } |
646 } | 646 } |
OLD | NEW |