| 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 #include "chrome/browser/ui/webui/textfields_ui.h" | 5 #include "chrome/browser/ui/webui/textfields_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
| 12 #include "base/utf_string_conversions.h" |
| 12 #include "base/values.h" | 13 #include "base/values.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/common/jstemplate_builder.h" | 15 #include "chrome/common/jstemplate_builder.h" |
| 15 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 16 #include "content/browser/browser_thread.h" | 17 #include "content/browser/browser_thread.h" |
| 17 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 18 #include "grit/browser_resources.h" | 19 #include "grit/browser_resources.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 20 | 21 |
| 21 /** | 22 /** |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 TextfieldsUI::TextfieldsUI(TabContents* contents) : WebUI(contents) { | 67 TextfieldsUI::TextfieldsUI(TabContents* contents) : WebUI(contents) { |
| 67 TextfieldsDOMHandler* handler = new TextfieldsDOMHandler(); | 68 TextfieldsDOMHandler* handler = new TextfieldsDOMHandler(); |
| 68 AddMessageHandler(handler); | 69 AddMessageHandler(handler); |
| 69 handler->Attach(this); | 70 handler->Attach(this); |
| 70 | 71 |
| 71 TextfieldsUIHTMLSource* html_source = new TextfieldsUIHTMLSource(); | 72 TextfieldsUIHTMLSource* html_source = new TextfieldsUIHTMLSource(); |
| 72 | 73 |
| 73 // Set up the chrome://textfields/ source. | 74 // Set up the chrome://textfields/ source. |
| 74 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 75 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 75 } | 76 } |
| OLD | NEW |