Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: chrome/browser/ui/login/login_prompt_ui.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/html_dialog_gtk.cc ('k') | chrome/browser/ui/views/html_dialog_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/login/login_prompt.h" 5 #include "chrome/browser/ui/login/login_prompt.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
17 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 17 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
18 #include "chrome/browser/ui/webui/constrained_html_ui.h" 18 #include "chrome/browser/ui/webui/constrained_html_ui.h"
19 #include "chrome/browser/ui/webui/html_dialog_ui.h" 19 #include "chrome/browser/ui/webui/html_dialog_ui.h"
20 #include "chrome/common/jstemplate_builder.h" 20 #include "chrome/common/jstemplate_builder.h"
21 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
22 #include "content/browser/tab_contents/tab_contents.h" 22 #include "content/browser/tab_contents/tab_contents.h"
23 #include "content/public/browser/web_ui_message_handler.h"
23 #include "grit/browser_resources.h" 24 #include "grit/browser_resources.h"
24 #include "grit/generated_resources.h" 25 #include "grit/generated_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
27 #include "ui/gfx/size.h" 28 #include "ui/gfx/size.h"
28 29
29 using content::BrowserThread; 30 using content::BrowserThread;
30 using content::WebContents; 31 using content::WebContents;
32 using content::WebUIMessageHandler;
31 33
32 class LoginHandlerSource : public ChromeURLDataManager::DataSource { 34 class LoginHandlerSource : public ChromeURLDataManager::DataSource {
33 public: 35 public:
34 LoginHandlerSource() 36 LoginHandlerSource()
35 : DataSource(chrome::kChromeUIHttpAuthHost, MessageLoop::current()) {} 37 : DataSource(chrome::kChromeUIHttpAuthHost, MessageLoop::current()) {}
36 38
37 virtual void StartDataRequest(const std::string& path, 39 virtual void StartDataRequest(const std::string& path,
38 bool is_off_the_record, 40 bool is_off_the_record,
39 int request_id) OVERRIDE { 41 int request_id) OVERRIDE {
40 DictionaryValue dict; 42 DictionaryValue dict;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 SetDialog(dialog); 259 SetDialog(dialog);
258 260
259 NotifyAuthNeeded(); 261 NotifyAuthNeeded();
260 } 262 }
261 263
262 // static 264 // static
263 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, 265 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info,
264 net::URLRequest* request) { 266 net::URLRequest* request) {
265 return new LoginHandlerHtml(auth_info, request); 267 return new LoginHandlerHtml(auth_info, request);
266 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/html_dialog_gtk.cc ('k') | chrome/browser/ui/views/html_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698