OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/printing/print_preview_dialog_controller.h" | 5 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 return; | 344 return; |
345 } | 345 } |
346 } | 346 } |
347 NOTREACHED(); | 347 NOTREACHED(); |
348 return; | 348 return; |
349 } | 349 } |
350 if (details) { | 350 if (details) { |
351 ui::PageTransition type = details->entry->GetTransitionType(); | 351 ui::PageTransition type = details->entry->GetTransitionType(); |
352 content::NavigationType nav_type = details->type; | 352 content::NavigationType nav_type = details->type; |
353 if (nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE && | 353 if (nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE && |
354 (ui::PageTransitionCoreTypeIs(type, ui::PAGE_TRANSITION_TYPED) || | 354 (ui::PageTransitionTypeIncludingQualifiersIs(type, |
Lei Zhang
2016/08/04 20:58:24
I'd run "git cl format" and let it sort out the in
| |
355 ui::PageTransitionCoreTypeIs(type, ui::PAGE_TRANSITION_LINK))) | 355 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED| |
356 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)) || | |
357 ui::PageTransitionTypeIncludingQualifiersIs(type, | |
358 ui::PAGE_TRANSITION_LINK))) | |
356 return; | 359 return; |
357 } | 360 } |
358 | 361 |
359 RemoveInitiator(contents); | 362 RemoveInitiator(contents); |
360 } | 363 } |
361 | 364 |
362 WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog( | 365 WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog( |
363 WebContents* initiator) { | 366 WebContents* initiator) { |
364 base::AutoReset<bool> auto_reset(&is_creating_print_preview_dialog_, true); | 367 base::AutoReset<bool> auto_reset(&is_creating_print_preview_dialog_, true); |
365 | 368 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 if (initiator) { | 470 if (initiator) { |
468 RemoveObservers(initiator); | 471 RemoveObservers(initiator); |
469 PrintViewManager::FromWebContents(initiator)->PrintPreviewDone(); | 472 PrintViewManager::FromWebContents(initiator)->PrintPreviewDone(); |
470 } | 473 } |
471 | 474 |
472 preview_dialog_map_.erase(preview_dialog); | 475 preview_dialog_map_.erase(preview_dialog); |
473 RemoveObservers(preview_dialog); | 476 RemoveObservers(preview_dialog); |
474 } | 477 } |
475 | 478 |
476 } // namespace printing | 479 } // namespace printing |
OLD | NEW |