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/chromeos/app_launcher.h" | 5 #include "chrome/browser/chromeos/app_launcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 bool user_gesture) { | 463 bool user_gesture) { |
464 if (disposition == NEW_POPUP) { | 464 if (disposition == NEW_POPUP) { |
465 pending_contents_->set_delegate(NULL); | 465 pending_contents_->set_delegate(NULL); |
466 browser_->GetSelectedTabContents()->AddNewContents( | 466 browser_->GetSelectedTabContents()->AddNewContents( |
467 pending_contents_.release(), disposition, initial_pos, user_gesture); | 467 pending_contents_.release(), disposition, initial_pos, user_gesture); |
468 Hide(); | 468 Hide(); |
469 } | 469 } |
470 } | 470 } |
471 | 471 |
472 void AppLauncher::StartDragging(const WebDropData& drop_data, | 472 void AppLauncher::StartDragging(const WebDropData& drop_data, |
473 WebKit::WebDragOperationsMask allowed_ops, | 473 WebKit::WebDragOperationsMask allowed_ops) { |
474 const SkBitmap& image, | |
475 const gfx::Point& image_offset) { | |
476 // We're not going to do any drag & drop, but we have to tell the renderer the | 474 // We're not going to do any drag & drop, but we have to tell the renderer the |
477 // drag & drop ended, othewise the renderer thinks the drag operation is | 475 // drag & drop ended, othewise the renderer thinks the drag operation is |
478 // underway and mouse events won't work. | 476 // underway and mouse events won't work. |
479 contents_rvh_->DragSourceSystemDragEnded(); | 477 contents_rvh_->DragSourceSystemDragEnded(); |
480 } | 478 } |
481 | 479 |
482 AppLauncher::TabContentsDelegateImpl::TabContentsDelegateImpl( | 480 AppLauncher::TabContentsDelegateImpl::TabContentsDelegateImpl( |
483 AppLauncher* app_launcher) | 481 AppLauncher* app_launcher) |
484 : app_launcher_(app_launcher) { | 482 : app_launcher_(app_launcher) { |
485 } | 483 } |
486 | 484 |
487 void AppLauncher::TabContentsDelegateImpl::OpenURLFromTab( | 485 void AppLauncher::TabContentsDelegateImpl::OpenURLFromTab( |
488 TabContents* source, | 486 TabContents* source, |
489 const GURL& url, | 487 const GURL& url, |
490 const GURL& referrer, | 488 const GURL& referrer, |
491 WindowOpenDisposition disposition, | 489 WindowOpenDisposition disposition, |
492 PageTransition::Type transition) { | 490 PageTransition::Type transition) { |
493 app_launcher_->browser_->OpenURL(url, referrer, NEW_FOREGROUND_TAB, | 491 app_launcher_->browser_->OpenURL(url, referrer, NEW_FOREGROUND_TAB, |
494 PageTransition::LINK); | 492 PageTransition::LINK); |
495 app_launcher_->Hide(); | 493 app_launcher_->Hide(); |
496 } | 494 } |
497 | 495 |
498 } // namespace chromeos | 496 } // namespace chromeos |
OLD | NEW |