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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h" 16 #include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h"
17 #include "components/signin/core/browser/gaia_cookie_manager_service.h" 17 #include "components/signin/core/browser/gaia_cookie_manager_service.h"
18 #include "content/public/browser/web_ui_message_handler.h" 18 #include "content/public/browser/web_ui_message_handler.h"
19 #include "ui/shell_dialogs/select_file_dialog.h" 19 #include "ui/shell_dialogs/select_file_dialog.h"
20 20
21 #if defined(ENABLE_SERVICE_DISCOVERY) 21 #if defined(ENABLE_SERVICE_DISCOVERY)
22 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" 22 #include "chrome/browser/local_discovery/service_discovery_shared_client.h"
23 #include "chrome/browser/printing/cloud_print/privet_local_printer_lister.h" 23 #include "chrome/browser/printing/cloud_print/privet_local_printer_lister.h"
24 #endif // defined(ENABLE_SERVICE_DISCOVERY) 24 #endif // defined(ENABLE_SERVICE_DISCOVERY)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 void ConvertColorSettingToCUPSColorModel( 263 void ConvertColorSettingToCUPSColorModel(
264 base::DictionaryValue* settings) const; 264 base::DictionaryValue* settings) const;
265 #endif 265 #endif
266 266
267 #if defined(ENABLE_SERVICE_DISCOVERY) 267 #if defined(ENABLE_SERVICE_DISCOVERY)
268 void StartPrivetLister(const scoped_refptr< 268 void StartPrivetLister(const scoped_refptr<
269 local_discovery::ServiceDiscoverySharedClient>& client); 269 local_discovery::ServiceDiscoverySharedClient>& client);
270 void OnPrivetCapabilities(const base::DictionaryValue* capabilities); 270 void OnPrivetCapabilities(const base::DictionaryValue* capabilities);
271 void PrivetCapabilitiesUpdateClient( 271 void PrivetCapabilitiesUpdateClient(
272 scoped_ptr<cloud_print::PrivetHTTPClient> http_client); 272 std::unique_ptr<cloud_print::PrivetHTTPClient> http_client);
273 void PrivetLocalPrintUpdateClient( 273 void PrivetLocalPrintUpdateClient(
274 std::string print_ticket, 274 std::string print_ticket,
275 std::string capabilities, 275 std::string capabilities,
276 gfx::Size page_size, 276 gfx::Size page_size,
277 scoped_ptr<cloud_print::PrivetHTTPClient> http_client); 277 std::unique_ptr<cloud_print::PrivetHTTPClient> http_client);
278 bool PrivetUpdateClient( 278 bool PrivetUpdateClient(
279 scoped_ptr<cloud_print::PrivetHTTPClient> http_client); 279 std::unique_ptr<cloud_print::PrivetHTTPClient> http_client);
280 void StartPrivetLocalPrint(const std::string& print_ticket, 280 void StartPrivetLocalPrint(const std::string& print_ticket,
281 const std::string& capabilities, 281 const std::string& capabilities,
282 const gfx::Size& page_size); 282 const gfx::Size& page_size);
283 void SendPrivetCapabilitiesError(const std::string& id); 283 void SendPrivetCapabilitiesError(const std::string& id);
284 void PrintToPrivetPrinter(const std::string& printer_name, 284 void PrintToPrivetPrinter(const std::string& printer_name,
285 const std::string& print_ticket, 285 const std::string& print_ticket,
286 const std::string& capabilities, 286 const std::string& capabilities,
287 const gfx::Size& page_size); 287 const gfx::Size& page_size);
288 bool CreatePrivetHTTP( 288 bool CreatePrivetHTTP(
289 const std::string& name, 289 const std::string& name,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 bool reported_failed_preview_; 347 bool reported_failed_preview_;
348 348
349 // Whether we have already logged the number of printers this session. 349 // Whether we have already logged the number of printers this session.
350 bool has_logged_printers_count_; 350 bool has_logged_printers_count_;
351 351
352 // Holds the path to the print to pdf request. It is empty if no such request 352 // Holds the path to the print to pdf request. It is empty if no such request
353 // exists. 353 // exists.
354 base::FilePath print_to_pdf_path_; 354 base::FilePath print_to_pdf_path_;
355 355
356 // Holds token service to get OAuth2 access tokens. 356 // Holds token service to get OAuth2 access tokens.
357 scoped_ptr<AccessTokenService> token_service_; 357 std::unique_ptr<AccessTokenService> token_service_;
358 358
359 // Pointer to cookie manager service so that print preview can listen for GAIA 359 // Pointer to cookie manager service so that print preview can listen for GAIA
360 // cookie changes. 360 // cookie changes.
361 GaiaCookieManagerService* gaia_cookie_manager_service_; 361 GaiaCookieManagerService* gaia_cookie_manager_service_;
362 362
363 #if defined(ENABLE_SERVICE_DISCOVERY) 363 #if defined(ENABLE_SERVICE_DISCOVERY)
364 scoped_refptr<local_discovery::ServiceDiscoverySharedClient> 364 scoped_refptr<local_discovery::ServiceDiscoverySharedClient>
365 service_discovery_client_; 365 service_discovery_client_;
366 scoped_ptr<cloud_print::PrivetLocalPrinterLister> printer_lister_; 366 std::unique_ptr<cloud_print::PrivetLocalPrinterLister> printer_lister_;
367 367
368 scoped_ptr<cloud_print::PrivetHTTPAsynchronousFactory> 368 std::unique_ptr<cloud_print::PrivetHTTPAsynchronousFactory>
369 privet_http_factory_; 369 privet_http_factory_;
370 scoped_ptr<cloud_print::PrivetHTTPResolution> privet_http_resolution_; 370 std::unique_ptr<cloud_print::PrivetHTTPResolution> privet_http_resolution_;
371 scoped_ptr<cloud_print::PrivetV1HTTPClient> privet_http_client_; 371 std::unique_ptr<cloud_print::PrivetV1HTTPClient> privet_http_client_;
372 scoped_ptr<cloud_print::PrivetJSONOperation> 372 std::unique_ptr<cloud_print::PrivetJSONOperation>
373 privet_capabilities_operation_; 373 privet_capabilities_operation_;
374 scoped_ptr<cloud_print::PrivetLocalPrintOperation> 374 std::unique_ptr<cloud_print::PrivetLocalPrintOperation>
375 privet_local_print_operation_; 375 privet_local_print_operation_;
376 #endif // defined(ENABLE_SERVICE_DISCOVERY) 376 #endif // defined(ENABLE_SERVICE_DISCOVERY)
377 377
378 // Handles requests for extension printers. Created lazily by calling 378 // Handles requests for extension printers. Created lazily by calling
379 // |EnsureExtensionPrinterHandlerSet|. 379 // |EnsureExtensionPrinterHandlerSet|.
380 scoped_ptr<PrinterHandler> extension_printer_handler_; 380 std::unique_ptr<PrinterHandler> extension_printer_handler_;
381 381
382 // Notifies tests that want to know if the PDF has been saved. This doesn't 382 // Notifies tests that want to know if the PDF has been saved. This doesn't
383 // notify the test if it was a successful save, only that it was attempted. 383 // notify the test if it was a successful save, only that it was attempted.
384 base::Closure pdf_file_saved_closure_; 384 base::Closure pdf_file_saved_closure_;
385 385
386 // A print preview that is responsible for rendering the page after 386 // A print preview that is responsible for rendering the page after
387 // being processed by the DOM Distiller. 387 // being processed by the DOM Distiller.
388 scoped_ptr<PrintPreviewDistiller> print_preview_distiller_; 388 std::unique_ptr<PrintPreviewDistiller> print_preview_distiller_;
389 389
390 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; 390 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
391 391
392 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 392 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
393 }; 393 };
394 394
395 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 395 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698