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

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

Issue 442303002: DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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_dialog_cloud.h" 5 #include "chrome/browser/printing/print_dialog_cloud.h"
6 6
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 } 380 }
381 } 381 }
382 382
383 void CloudPrintFlowHandler::HandleShowDebugger(const base::ListValue* args) { 383 void CloudPrintFlowHandler::HandleShowDebugger(const base::ListValue* args) {
384 ShowDebugger(); 384 ShowDebugger();
385 } 385 }
386 386
387 void CloudPrintFlowHandler::ShowDebugger() { 387 void CloudPrintFlowHandler::ShowDebugger() {
388 if (web_ui()) { 388 if (web_ui()) {
389 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); 389 WebContents* web_contents = web_ui()->GetWebContents();
390 if (rvh) 390 if (web_contents)
391 DevToolsWindow::OpenDevToolsWindow(rvh); 391 DevToolsWindow::OpenDevToolsWindow(web_contents);
392 } 392 }
393 } 393 }
394 394
395 scoped_refptr<CloudPrintDataSender> 395 scoped_refptr<CloudPrintDataSender>
396 CloudPrintFlowHandler::CreateCloudPrintDataSender() { 396 CloudPrintFlowHandler::CreateCloudPrintDataSender() {
397 DCHECK(web_ui()); 397 DCHECK(web_ui());
398 print_data_helper_.reset(new CloudPrintDataSenderHelper(web_ui())); 398 print_data_helper_.reset(new CloudPrintDataSenderHelper(web_ui()));
399 scoped_refptr<CloudPrintDataSender> sender( 399 scoped_refptr<CloudPrintDataSender> sender(
400 new CloudPrintDataSender(print_data_helper_.get(), 400 new CloudPrintDataSender(print_data_helper_.get(),
401 print_job_title_, 401 print_job_title_,
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 775
776 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, 776 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL,
777 cloud_print_file, print_job_title, print_job_print_ticket, file_type); 777 cloud_print_file, print_job_title, print_job_print_ticket, file_type);
778 return true; 778 return true;
779 } 779 }
780 } 780 }
781 return false; 781 return false;
782 } 782 }
783 783
784 } // namespace print_dialog_cloud 784 } // namespace print_dialog_cloud
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698