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 CONTENT_BROWSER_WEBUI_WEB_UI_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_H_ |
6 #define CONTENT_BROWSER_WEBUI_WEB_UI_H_ | 6 #define CONTENT_BROWSER_WEBUI_WEB_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 static void SetURLAndTitle(base::DictionaryValue* dictionary, | 212 static void SetURLAndTitle(base::DictionaryValue* dictionary, |
213 string16 title, | 213 string16 title, |
214 const GURL& gurl); | 214 const GURL& gurl); |
215 | 215 |
216 // This is where subclasses specify which messages they'd like to handle. | 216 // This is where subclasses specify which messages they'd like to handle. |
217 virtual void RegisterMessages() = 0; | 217 virtual void RegisterMessages() = 0; |
218 | 218 |
219 // Extract an integer value from a list Value. | 219 // Extract an integer value from a list Value. |
220 bool ExtractIntegerValue(const base::ListValue* value, int* out_int); | 220 bool ExtractIntegerValue(const base::ListValue* value, int* out_int); |
221 | 221 |
| 222 // Extract a floating point (double) value from a list Value. |
| 223 bool ExtractDoubleValue(const base::ListValue* value, double* out_value); |
| 224 |
222 // Extract a string value from a list Value. | 225 // Extract a string value from a list Value. |
223 string16 ExtractStringValue(const base::ListValue* value); | 226 string16 ExtractStringValue(const base::ListValue* value); |
224 | 227 |
225 // Returns the attached WebUI for this handler. | 228 // Returns the attached WebUI for this handler. |
226 WebUI* web_ui() const { return web_ui_; } | 229 WebUI* web_ui() const { return web_ui_; } |
227 | 230 |
228 WebUI* web_ui_; // TODO(wyck): Make private after merge conflicts go away. | 231 WebUI* web_ui_; // TODO(wyck): Make private after merge conflicts go away. |
229 | 232 |
230 private: | 233 private: |
231 DISALLOW_COPY_AND_ASSIGN(WebUIMessageHandler); | 234 DISALLOW_COPY_AND_ASSIGN(WebUIMessageHandler); |
232 }; | 235 }; |
233 | 236 |
234 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_H_ | 237 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_H_ |
OLD | NEW |