Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 9969208: TabContents -> WebContentsImpl, part 20. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_tab_controller.h" 5 #include "chrome/browser/printing/print_preview_tab_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 void PrintPreviewTabController::RemovePreviewTab( 528 void PrintPreviewTabController::RemovePreviewTab(
529 TabContentsWrapper* preview_tab) { 529 TabContentsWrapper* preview_tab) {
530 // Remove the initiator tab's observers before erasing the mapping. 530 // Remove the initiator tab's observers before erasing the mapping.
531 TabContentsWrapper* initiator_tab = GetInitiatorTab(preview_tab); 531 TabContentsWrapper* initiator_tab = GetInitiatorTab(preview_tab);
532 if (initiator_tab) { 532 if (initiator_tab) {
533 RemoveObservers(initiator_tab); 533 RemoveObservers(initiator_tab);
534 initiator_tab->print_view_manager()->PrintPreviewDone(); 534 initiator_tab->print_view_manager()->PrintPreviewDone();
535 } 535 }
536 536
537 // Print preview TabContents is destroyed. Notify |PrintPreviewUI| to abort 537 // Print preview WebContents is destroyed. Notify |PrintPreviewUI| to abort
538 // the initiator tab preview request. 538 // the initiator tab preview request.
539 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( 539 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
540 preview_tab->web_contents()->GetWebUI()->GetController()); 540 preview_tab->web_contents()->GetWebUI()->GetController());
541 if (print_preview_ui) 541 if (print_preview_ui)
542 print_preview_ui->OnTabDestroyed(); 542 print_preview_ui->OnTabDestroyed();
543 543
544 preview_tab_map_.erase(preview_tab); 544 preview_tab_map_.erase(preview_tab);
545 RemoveObservers(preview_tab); 545 RemoveObservers(preview_tab);
546 } 546 }
547 547
548 } // namespace printing 548 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.h ('k') | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698