| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 virtual bool IsDialogModal() const; | 151 virtual bool IsDialogModal() const; |
| 152 virtual std::wstring GetDialogTitle() const; | 152 virtual std::wstring GetDialogTitle() const; |
| 153 virtual GURL GetDialogContentURL() const; | 153 virtual GURL GetDialogContentURL() const; |
| 154 virtual void GetWebUIMessageHandlers( | 154 virtual void GetWebUIMessageHandlers( |
| 155 std::vector<WebUIMessageHandler*>* handlers) const; | 155 std::vector<WebUIMessageHandler*>* handlers) const; |
| 156 virtual void GetDialogSize(gfx::Size* size) const; | 156 virtual void GetDialogSize(gfx::Size* size) const; |
| 157 virtual std::string GetDialogArgs() const; | 157 virtual std::string GetDialogArgs() const; |
| 158 virtual void OnDialogClosed(const std::string& json_retval); | 158 virtual void OnDialogClosed(const std::string& json_retval); |
| 159 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); | 159 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); |
| 160 virtual bool ShouldShowDialogTitle() const; | 160 virtual bool ShouldShowDialogTitle() const; |
| 161 virtual bool HandleContextMenu(const ContextMenuParams& params); |
| 161 | 162 |
| 162 private: | 163 private: |
| 163 friend class ::CloudPrintHtmlDialogDelegateTest; | 164 friend class ::CloudPrintHtmlDialogDelegateTest; |
| 164 | 165 |
| 165 // For unit testing. | 166 // For unit testing. |
| 166 CloudPrintHtmlDialogDelegate(CloudPrintFlowHandler* flow_handler, | 167 CloudPrintHtmlDialogDelegate(CloudPrintFlowHandler* flow_handler, |
| 167 int width, int height, | 168 int width, int height, |
| 168 const std::string& json_arguments, | 169 const std::string& json_arguments, |
| 169 bool modal); | 170 bool modal); |
| 170 void Init(int width, int height, const std::string& json_arguments); | 171 void Init(int width, int height, const std::string& json_arguments); |
| 171 | 172 |
| 172 CloudPrintFlowHandler* flow_handler_; | 173 CloudPrintFlowHandler* flow_handler_; |
| 173 bool modal_; | 174 bool modal_; |
| 174 mutable bool owns_flow_handler_; | 175 mutable bool owns_flow_handler_; |
| 175 | 176 |
| 176 // The parameters needed to display a modal HTML dialog. | 177 // The parameters needed to display a modal HTML dialog. |
| 177 HtmlDialogUI::HtmlDialogParams params_; | 178 HtmlDialogUI::HtmlDialogParams params_; |
| 178 | 179 |
| 179 DISALLOW_COPY_AND_ASSIGN(CloudPrintHtmlDialogDelegate); | 180 DISALLOW_COPY_AND_ASSIGN(CloudPrintHtmlDialogDelegate); |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 void CreateDialogImpl(const FilePath& path_to_file, | 183 void CreateDialogImpl(const FilePath& path_to_file, |
| 183 const string16& print_job_title, | 184 const string16& print_job_title, |
| 184 const std::string& file_type, | 185 const std::string& file_type, |
| 185 bool modal); | 186 bool modal); |
| 186 | 187 |
| 187 } // namespace internal_cloud_print_helpers | 188 } // namespace internal_cloud_print_helpers |
| 188 | 189 |
| 189 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ | 190 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ |
| OLD | NEW |