| 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_UI_WEBUI_TEXTFIELDS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_TEXTFIELDS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_TEXTFIELDS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_TEXTFIELDS_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 /** | 39 /** |
| 40 * Handler for JavaScript calls from the DOM. | 40 * Handler for JavaScript calls from the DOM. |
| 41 */ | 41 */ |
| 42 class TextfieldsDOMHandler : public WebUIMessageHandler { | 42 class TextfieldsDOMHandler : public WebUIMessageHandler { |
| 43 public: | 43 public: |
| 44 TextfieldsDOMHandler(); | 44 TextfieldsDOMHandler(); |
| 45 | 45 |
| 46 // Handles the "textfieldValue" call from the JavaScript. This call | 46 // Handles the "textfieldValue" call from the JavaScript. This call |
| 47 // synchonizes the value inside the JavaScript textfield with the copy in the | 47 // synchonizes the value inside the JavaScript textfield with the copy in the |
| 48 // DOM object. | 48 // DOM object. |
| 49 virtual void HandleTextfieldValue(const ListValue* args); | 49 virtual void HandleTextfieldValue(const base::ListValue* args); |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 virtual void RegisterMessages(); | 52 virtual void RegisterMessages(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(TextfieldsDOMHandler); | 55 DISALLOW_COPY_AND_ASSIGN(TextfieldsDOMHandler); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class TextfieldsUI : public ChromeWebUI { | 58 class TextfieldsUI : public ChromeWebUI { |
| 59 public: | 59 public: |
| 60 explicit TextfieldsUI(TabContents* contents); | 60 explicit TextfieldsUI(TabContents* contents); |
| 61 | 61 |
| 62 const std::wstring& text() const { return text_; } | 62 const std::wstring& text() const { return text_; } |
| 63 void set_text(const std::wstring& text) { text_ = text; } | 63 void set_text(const std::wstring& text) { text_ = text; } |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 std::wstring text_; | 66 std::wstring text_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(TextfieldsUI); | 68 DISALLOW_COPY_AND_ASSIGN(TextfieldsUI); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_UI_WEBUI_TEXTFIELDS_UI_H_ | 71 #endif // CHROME_BROWSER_UI_WEBUI_TEXTFIELDS_UI_H_ |
| OLD | NEW |