| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/views/extensions/media_galleries_scan_result_dialog_
views.h" | 5 #include "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_
views.h" |
| 6 | 6 |
| 7 #include "components/web_modal/web_contents_modal_dialog_host.h" | 7 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 8 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 8 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 if (context_menu_runner_->RunMenuAt( | 316 if (context_menu_runner_->RunMenuAt( |
| 317 GetWidget(), NULL, gfx::Rect(point.x(), point.y(), 0, 0), | 317 GetWidget(), NULL, gfx::Rect(point.x(), point.y(), 0, 0), |
| 318 views::MenuItemView::TOPLEFT, source_type, | 318 views::MenuItemView::TOPLEFT, source_type, |
| 319 views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == | 319 views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == |
| 320 views::MenuRunner::MENU_DELETED) { | 320 views::MenuRunner::MENU_DELETED) { |
| 321 return; | 321 return; |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 | 324 |
| 325 void MediaGalleriesScanResultDialogViews::AcceptDialogForTesting() { |
| 326 accepted_ = true; |
| 327 |
| 328 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 329 web_modal::WebContentsModalDialogManager::FromWebContents( |
| 330 controller_->web_contents()); |
| 331 DCHECK(web_contents_modal_dialog_manager); |
| 332 web_modal::WebContentsModalDialogManager::TestApi( |
| 333 web_contents_modal_dialog_manager).CloseAllDialogs(); |
| 334 } |
| 335 |
| 325 // MediaGalleriesScanResultDialogViewsController ------------------------------- | 336 // MediaGalleriesScanResultDialogViewsController ------------------------------- |
| 326 | 337 |
| 327 // static | 338 // static |
| 328 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( | 339 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( |
| 329 MediaGalleriesScanResultDialogController* controller) { | 340 MediaGalleriesScanResultDialogController* controller) { |
| 330 return new MediaGalleriesScanResultDialogViews(controller); | 341 return new MediaGalleriesScanResultDialogViews(controller); |
| 331 } | 342 } |
| OLD | NEW |