| 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 |
| 11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 12 #include "content/browser/webui/web_ui.h" | 12 #include "content/browser/webui/web_ui.h" |
| 13 | 13 |
| 14 class RefCountedMemory; | 14 class RefCountedMemory; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * ChromeURLDataManager::DataSource implementation that asynchronously answers | 17 * ChromeURLDataManager::DataSource implementation that asynchronously answers |
| 18 * requests for chrome://textfields URL. On receiving a request, this object | 18 * requests for chrome://textfields URL. On receiving a request, this object |
| 19 * reads the html from the local resource textfields.html and sends back the | 19 * reads the html from the local resource textfields.html and sends back the |
| 20 * response. | 20 * response. |
| 21 */ | 21 */ |
| 22 class TextfieldsUIHTMLSource : public ChromeURLDataManager::DataSource { | 22 class TextfieldsUIHTMLSource : public ChromeURLDataManager::DataSource { |
| 23 public: | 23 public: |
| 24 TextfieldsUIHTMLSource(); | 24 TextfieldsUIHTMLSource(); |
| 25 | 25 |
| 26 // Called when the network layer has requested a resource underneath | 26 // Called when the network layer has requested a resource underneath |
| 27 // the path we registered. | 27 // the path we registered. |
| 28 virtual void StartDataRequest(const std::string& path, | 28 virtual void StartDataRequest(const std::string& path, |
| 29 bool is_off_the_record, | 29 bool is_incognito, |
| 30 int request_id); | 30 int request_id); |
| 31 virtual std::string GetMimeType(const std::string& path) const; | 31 virtual std::string GetMimeType(const std::string& path) const; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 virtual ~TextfieldsUIHTMLSource(); | 34 virtual ~TextfieldsUIHTMLSource(); |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(TextfieldsUIHTMLSource); | 36 DISALLOW_COPY_AND_ASSIGN(TextfieldsUIHTMLSource); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 /** | 39 /** |
| (...skipping 22 matching lines...) Expand all Loading... |
| 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 |