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

Side by Side Diff: chrome/browser/printing/print_dialog_cloud_internal.h

Issue 9241032: Switch chrome code to use content::WebUI interface instead of WebUI concrete class. The latter wi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 class ListValue; 24 class ListValue;
25 class StringValue; 25 class StringValue;
26 class Value; 26 class Value;
27 } 27 }
28 28
29 namespace internal_cloud_print_helpers { 29 namespace internal_cloud_print_helpers {
30 30
31 // Small class to virtualize a few functions to aid with unit testing. 31 // Small class to virtualize a few functions to aid with unit testing.
32 class CloudPrintDataSenderHelper { 32 class CloudPrintDataSenderHelper {
33 public: 33 public:
34 explicit CloudPrintDataSenderHelper(WebUI* web_ui) : web_ui_(web_ui) {} 34 explicit CloudPrintDataSenderHelper(content::WebUI* web_ui)
35 : web_ui_(web_ui) {}
35 virtual ~CloudPrintDataSenderHelper() {} 36 virtual ~CloudPrintDataSenderHelper() {}
36 37
37 // Virtualize the overrides of these three functions from WebUI to 38 void CallJavascriptFunction(const std::wstring& function_name);
Elliot Glaysher 2012/01/18 01:34:08 Is it really ok to devirtualize these methods? Moc
jam 2012/01/18 01:41:38 no, that was me learning about why it's not ok to
38 // facilitate unit testing. 39 void CallJavascriptFunction(const std::wstring& function_name,
39 virtual void CallJavascriptFunction(const std::wstring& function_name); 40 const base::Value& arg);
40 virtual void CallJavascriptFunction(const std::wstring& function_name, 41 void CallJavascriptFunction(const std::wstring& function_name,
41 const base::Value& arg); 42 const base::Value& arg1,
42 virtual void CallJavascriptFunction(const std::wstring& function_name, 43 const base::Value& arg2);
43 const base::Value& arg1, 44 void CallJavascriptFunction(const std::wstring& function_name,
44 const base::Value& arg2); 45 const base::Value& arg1,
45 virtual void CallJavascriptFunction(const std::wstring& function_name, 46 const base::Value& arg2,
46 const base::Value& arg1, 47 const base::Value& arg3);
47 const base::Value& arg2,
48 const base::Value& arg3);
49 48
50 private: 49 private:
51 WebUI* web_ui_; 50 content::WebUI* web_ui_;
52 51
53 DISALLOW_COPY_AND_ASSIGN(CloudPrintDataSenderHelper); 52 DISALLOW_COPY_AND_ASSIGN(CloudPrintDataSenderHelper);
54 }; 53 };
55 54
56 // Small helper class to get the print data loaded in from the PDF 55 // Small helper class to get the print data loaded in from the PDF
57 // file (on the FILE thread) and send it to the print dialog contents 56 // file (on the FILE thread) and send it to the print dialog contents
58 // (on the IO thread), allowing for cancellation. 57 // (on the IO thread), allowing for cancellation.
59 class CloudPrintDataSender 58 class CloudPrintDataSender
60 : public base::RefCountedThreadSafe<CloudPrintDataSender> { 59 : public base::RefCountedThreadSafe<CloudPrintDataSender> {
61 public: 60 public:
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const string16& print_ticket, 203 const string16& print_ticket,
205 const std::string& file_type, 204 const std::string& file_type,
206 bool modal, 205 bool modal,
207 bool delete_on_close); 206 bool delete_on_close);
208 207
209 void Delete(const FilePath& path_to_file); 208 void Delete(const FilePath& path_to_file);
210 209
211 } // namespace internal_cloud_print_helpers 210 } // namespace internal_cloud_print_helpers
212 211
213 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ 212 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/printing/print_preview_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698