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

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

Issue 4110010: Cloud Print Dialog work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Direct paths for prefs. Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void HandleSendPrintData(const ListValue* args); 107 void HandleSendPrintData(const ListValue* args);
108 void HandleSetPageParameters(const ListValue* args); 108 void HandleSetPageParameters(const ListValue* args);
109 109
110 // Call to get the debugger loaded on our hosted dialog page 110 // Call to get the debugger loaded on our hosted dialog page
111 // specifically. Since we're not in an official browser tab, only 111 // specifically. Since we're not in an official browser tab, only
112 // way to get the debugger going. 112 // way to get the debugger going.
113 void ShowDebugger(); 113 void ShowDebugger();
114 114
115 virtual void SetDialogDelegate(CloudPrintHtmlDialogDelegate *delegate); 115 virtual void SetDialogDelegate(CloudPrintHtmlDialogDelegate *delegate);
116 void CancelAnyRunningTask(); 116 void CancelAnyRunningTask();
117 void StoreDialogClientSize() const;
117 118
118 private: 119 private:
119 // For unit testing. 120 // For unit testing.
120 virtual scoped_refptr<CloudPrintDataSender> CreateCloudPrintDataSender(); 121 virtual scoped_refptr<CloudPrintDataSender> CreateCloudPrintDataSender();
121 122
122 CloudPrintHtmlDialogDelegate* dialog_delegate_; 123 CloudPrintHtmlDialogDelegate* dialog_delegate_;
123 NotificationRegistrar registrar_; 124 NotificationRegistrar registrar_;
124 FilePath path_to_pdf_; 125 FilePath path_to_pdf_;
125 string16 print_job_title_; 126 string16 print_job_title_;
126 scoped_refptr<CloudPrintDataSender> print_data_sender_; 127 scoped_refptr<CloudPrintDataSender> print_data_sender_;
(...skipping 16 matching lines...) Expand all
143 // HTMLDialogUIDelegate implementation: 144 // HTMLDialogUIDelegate implementation:
144 virtual bool IsDialogModal() const; 145 virtual bool IsDialogModal() const;
145 virtual std::wstring GetDialogTitle() const; 146 virtual std::wstring GetDialogTitle() const;
146 virtual GURL GetDialogContentURL() const; 147 virtual GURL GetDialogContentURL() const;
147 virtual void GetDOMMessageHandlers( 148 virtual void GetDOMMessageHandlers(
148 std::vector<DOMMessageHandler*>* handlers) const; 149 std::vector<DOMMessageHandler*>* handlers) const;
149 virtual void GetDialogSize(gfx::Size* size) const; 150 virtual void GetDialogSize(gfx::Size* size) const;
150 virtual std::string GetDialogArgs() const; 151 virtual std::string GetDialogArgs() const;
151 virtual void OnDialogClosed(const std::string& json_retval); 152 virtual void OnDialogClosed(const std::string& json_retval);
152 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); 153 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog);
154 virtual bool ShouldShowDialogTitle() const;
153 155
154 private: 156 private:
155 friend class ::CloudPrintHtmlDialogDelegateTest; 157 friend class ::CloudPrintHtmlDialogDelegateTest;
156 158
157 CloudPrintHtmlDialogDelegate(CloudPrintFlowHandler* flow_handler, 159 CloudPrintHtmlDialogDelegate(CloudPrintFlowHandler* flow_handler,
158 int width, int height, 160 int width, int height,
159 const std::string& json_arguments); 161 const std::string& json_arguments);
160 void Init(int width, int height, const std::string& json_arguments); 162 void Init(int width, int height, const std::string& json_arguments);
161 163
162 CloudPrintFlowHandler* flow_handler_; 164 CloudPrintFlowHandler* flow_handler_;
163 mutable bool owns_flow_handler_; 165 mutable bool owns_flow_handler_;
164 166
165 // The parameters needed to display a modal HTML dialog. 167 // The parameters needed to display a modal HTML dialog.
166 HtmlDialogUI::HtmlDialogParams params_; 168 HtmlDialogUI::HtmlDialogParams params_;
167 169
168 DISALLOW_COPY_AND_ASSIGN(CloudPrintHtmlDialogDelegate); 170 DISALLOW_COPY_AND_ASSIGN(CloudPrintHtmlDialogDelegate);
169 }; 171 };
170 172
171 } // namespace internal_cloud_print_helpers 173 } // namespace internal_cloud_print_helpers
172 174
173 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ 175 #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_dialog_cloud_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698