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

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

Issue 1294663003: Fix various issues from r343263. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 // Called when an extension print job is completed. 331 // Called when an extension print job is completed.
332 // |success|: Whether the job succeeded. 332 // |success|: Whether the job succeeded.
333 // |status|: The returned print job status. Useful for reporting a specific 333 // |status|: The returned print job status. Useful for reporting a specific
334 // error. 334 // error.
335 void OnExtensionPrintResult(bool success, const std::string& status); 335 void OnExtensionPrintResult(bool success, const std::string& status);
336 336
337 // Called when the DOM Distiller determines whether or not this page can 337 // Called when the DOM Distiller determines whether or not this page can
338 // be distilled. 338 // be distilled.
339 // |distillable|: Whether or not this page can be distilled. 339 // |distillable|: Whether or not this page can be distilled.
340 void HandleIsPageDistillableResult(bool distillable); 340 void OnGotPageDistillableResult(bool distillable);
Lei Zhang 2015/08/14 05:44:35 nit: name it consistently with everything else.
341
342 // Called if the DOM Distiller failed.
343 void OnDistillerFailed();
341 344
342 // Register/unregister from notifications of changes done to the GAIA 345 // Register/unregister from notifications of changes done to the GAIA
343 // cookie. 346 // cookie.
344 void RegisterForGaiaCookieChanges(); 347 void RegisterForGaiaCookieChanges();
345 void UnregisterForGaiaCookieChanges(); 348 void UnregisterForGaiaCookieChanges();
346 349
347 // The underlying dialog object. 350 // The underlying dialog object.
348 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; 351 scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
349 352
350 // A count of how many requests received to regenerate preview data. 353 // A count of how many requests received to regenerate preview data.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 #endif 391 #endif
389 392
390 // Handles requests for extension printers. Created lazily by calling 393 // Handles requests for extension printers. Created lazily by calling
391 // |EnsureExtensionPrinterHandlerSet|. 394 // |EnsureExtensionPrinterHandlerSet|.
392 scoped_ptr<PrinterHandler> extension_printer_handler_; 395 scoped_ptr<PrinterHandler> extension_printer_handler_;
393 396
394 // Notifies tests that want to know if the PDF has been saved. This doesn't 397 // Notifies tests that want to know if the PDF has been saved. This doesn't
395 // notify the test if it was a successful save, only that it was attempted. 398 // notify the test if it was a successful save, only that it was attempted.
396 base::Closure pdf_file_saved_closure_; 399 base::Closure pdf_file_saved_closure_;
397 400
398 // A print preview that is responsible for rendering the page after 401 // The class that is responsible for rendering the page after being processed
Lei Zhang 2015/08/14 05:44:36 A PrintPreviewDistiller != "a print preview"
399 // being processed by the DOM Distiller. 402 // by the DOM Distiller.
400 scoped_ptr<PrintPreviewDistiller> print_preview_distiller_; 403 scoped_ptr<PrintPreviewDistiller> print_preview_distiller_;
401 404
402 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; 405 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
403 406
404 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 407 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
405 }; 408 };
406 409
407 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 410 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698