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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 10534098: TabContentsWrapper -> TabContents, part 51. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/ui/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 base::Unretained(this))); 275 base::Unretained(this)));
276 web_ui()->RegisterMessageCallback("getInitialSettings", 276 web_ui()->RegisterMessageCallback("getInitialSettings",
277 base::Bind(&PrintPreviewHandler::HandleGetInitialSettings, 277 base::Bind(&PrintPreviewHandler::HandleGetInitialSettings,
278 base::Unretained(this))); 278 base::Unretained(this)));
279 web_ui()->RegisterMessageCallback("reportDestinationEvent", 279 web_ui()->RegisterMessageCallback("reportDestinationEvent",
280 base::Bind(&PrintPreviewHandler::HandleReportDestinationEvent, 280 base::Bind(&PrintPreviewHandler::HandleReportDestinationEvent,
281 base::Unretained(this))); 281 base::Unretained(this)));
282 } 282 }
283 283
284 TabContents* PrintPreviewHandler::preview_tab_contents() const { 284 TabContents* PrintPreviewHandler::preview_tab_contents() const {
285 return TabContents::GetCurrentWrapperForContents(preview_web_contents()); 285 return TabContents::FromWebContents(preview_web_contents());
286 } 286 }
287 287
288 WebContents* PrintPreviewHandler::preview_web_contents() const { 288 WebContents* PrintPreviewHandler::preview_web_contents() const {
289 return web_ui()->GetWebContents(); 289 return web_ui()->GetWebContents();
290 } 290 }
291 291
292 void PrintPreviewHandler::HandleGetPrinters(const ListValue* /*args*/) { 292 void PrintPreviewHandler::HandleGetPrinters(const ListValue* /*args*/) {
293 scoped_refptr<PrintSystemTaskProxy> task = 293 scoped_refptr<PrintSystemTaskProxy> task =
294 new PrintSystemTaskProxy(AsWeakPtr(), 294 new PrintSystemTaskProxy(AsWeakPtr(),
295 print_backend_.get(), 295 print_backend_.get(),
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 return; 908 return;
909 909
910 // We no longer require the initiator tab details. Remove those details 910 // We no longer require the initiator tab details. Remove those details
911 // associated with the preview tab to allow the initiator tab to create 911 // associated with the preview tab to allow the initiator tab to create
912 // another preview tab. 912 // another preview tab.
913 printing::PrintPreviewTabController* tab_controller = 913 printing::PrintPreviewTabController* tab_controller =
914 printing::PrintPreviewTabController::GetInstance(); 914 printing::PrintPreviewTabController::GetInstance();
915 if (tab_controller) 915 if (tab_controller)
916 tab_controller->EraseInitiatorTabInfo(preview_tab_contents()); 916 tab_controller->EraseInitiatorTabInfo(preview_tab_contents());
917 } 917 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options2/options_ui2_browsertest.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698