OLD | NEW |
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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 class CloudPrintFlowHandler : public content::WebUIMessageHandler, | 95 class CloudPrintFlowHandler : public content::WebUIMessageHandler, |
96 public content::NotificationObserver { | 96 public content::NotificationObserver { |
97 public: | 97 public: |
98 CloudPrintFlowHandler(const base::RefCountedMemory* data, | 98 CloudPrintFlowHandler(const base::RefCountedMemory* data, |
99 const base::string16& print_job_title, | 99 const base::string16& print_job_title, |
100 const base::string16& print_ticket, | 100 const base::string16& print_ticket, |
101 const std::string& file_type); | 101 const std::string& file_type); |
102 virtual ~CloudPrintFlowHandler(); | 102 virtual ~CloudPrintFlowHandler(); |
103 | 103 |
104 // WebUIMessageHandler implementation. | 104 // WebUIMessageHandler implementation. |
105 virtual void RegisterMessages() OVERRIDE; | 105 virtual void RegisterMessages() override; |
106 | 106 |
107 // content::NotificationObserver implementation. | 107 // content::NotificationObserver implementation. |
108 virtual void Observe(int type, | 108 virtual void Observe(int type, |
109 const content::NotificationSource& source, | 109 const content::NotificationSource& source, |
110 const content::NotificationDetails& details) OVERRIDE; | 110 const content::NotificationDetails& details) override; |
111 | 111 |
112 // Callbacks from the page. | 112 // Callbacks from the page. |
113 void HandleShowDebugger(const base::ListValue* args); | 113 void HandleShowDebugger(const base::ListValue* args); |
114 void HandleSendPrintData(const base::ListValue* args); | 114 void HandleSendPrintData(const base::ListValue* args); |
115 void HandleSetPageParameters(const base::ListValue* args); | 115 void HandleSetPageParameters(const base::ListValue* args); |
116 | 116 |
117 virtual void SetDialogDelegate(CloudPrintWebDialogDelegate *delegate); | 117 virtual void SetDialogDelegate(CloudPrintWebDialogDelegate *delegate); |
118 void StoreDialogClientSize() const; | 118 void StoreDialogClientSize() const; |
119 | 119 |
120 private: | 120 private: |
(...skipping 27 matching lines...) Expand all Loading... |
148 CloudPrintWebDialogDelegate(content::BrowserContext* browser_context, | 148 CloudPrintWebDialogDelegate(content::BrowserContext* browser_context, |
149 gfx::NativeWindow modal_parent, | 149 gfx::NativeWindow modal_parent, |
150 const base::RefCountedMemory* data, | 150 const base::RefCountedMemory* data, |
151 const std::string& json_arguments, | 151 const std::string& json_arguments, |
152 const base::string16& print_job_title, | 152 const base::string16& print_job_title, |
153 const base::string16& print_ticket, | 153 const base::string16& print_ticket, |
154 const std::string& file_type); | 154 const std::string& file_type); |
155 virtual ~CloudPrintWebDialogDelegate(); | 155 virtual ~CloudPrintWebDialogDelegate(); |
156 | 156 |
157 // ui::WebDialogDelegate implementation: | 157 // ui::WebDialogDelegate implementation: |
158 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 158 virtual ui::ModalType GetDialogModalType() const override; |
159 virtual base::string16 GetDialogTitle() const OVERRIDE; | 159 virtual base::string16 GetDialogTitle() const override; |
160 virtual GURL GetDialogContentURL() const OVERRIDE; | 160 virtual GURL GetDialogContentURL() const override; |
161 virtual void GetWebUIMessageHandlers( | 161 virtual void GetWebUIMessageHandlers( |
162 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 162 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
163 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 163 virtual void GetDialogSize(gfx::Size* size) const override; |
164 virtual std::string GetDialogArgs() const OVERRIDE; | 164 virtual std::string GetDialogArgs() const override; |
165 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 165 virtual void OnDialogClosed(const std::string& json_retval) override; |
166 virtual void OnCloseContents(content::WebContents* source, | 166 virtual void OnCloseContents(content::WebContents* source, |
167 bool* out_close_dialog) OVERRIDE; | 167 bool* out_close_dialog) override; |
168 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 168 virtual bool ShouldShowDialogTitle() const override; |
169 virtual bool HandleContextMenu( | 169 virtual bool HandleContextMenu( |
170 const content::ContextMenuParams& params) OVERRIDE; | 170 const content::ContextMenuParams& params) override; |
171 | 171 |
172 private: | 172 private: |
173 friend class ::CloudPrintWebDialogDelegateTest; | 173 friend class ::CloudPrintWebDialogDelegateTest; |
174 | 174 |
175 // For unit testing. | 175 // For unit testing. |
176 CloudPrintWebDialogDelegate(CloudPrintFlowHandler* flow_handler, | 176 CloudPrintWebDialogDelegate(CloudPrintFlowHandler* flow_handler, |
177 const std::string& json_arguments); | 177 const std::string& json_arguments); |
178 void Init(content::BrowserContext* browser_context, | 178 void Init(content::BrowserContext* browser_context, |
179 const std::string& json_arguments); | 179 const std::string& json_arguments); |
180 | 180 |
(...skipping 11 matching lines...) Expand all Loading... |
192 void CreateDialogForFileImpl(content::BrowserContext* browser_context, | 192 void CreateDialogForFileImpl(content::BrowserContext* browser_context, |
193 gfx::NativeWindow modal_parent, | 193 gfx::NativeWindow modal_parent, |
194 const base::FilePath& path_to_file, | 194 const base::FilePath& path_to_file, |
195 const base::string16& print_job_title, | 195 const base::string16& print_job_title, |
196 const base::string16& print_ticket, | 196 const base::string16& print_ticket, |
197 const std::string& file_type); | 197 const std::string& file_type); |
198 | 198 |
199 } // namespace internal_cloud_print_helpers | 199 } // namespace internal_cloud_print_helpers |
200 | 200 |
201 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ | 201 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_INTERNAL_H_ |
OLD | NEW |