| 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/browser_signin.h" | 5 #include "chrome/browser/browser_signin.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 void BrowserSigninHtml::ReloadUI() { | 152 void BrowserSigninHtml::ReloadUI() { |
| 153 HandleSigninInit(NULL); | 153 HandleSigninInit(NULL); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void BrowserSigninHtml::ForceDialogClose() { | 156 void BrowserSigninHtml::ForceDialogClose() { |
| 157 if (!closed_ && web_ui_) { | 157 if (!closed_ && web_ui_) { |
| 158 StringValue value("DialogClose"); | 158 StringValue value("DialogClose"); |
| 159 ListValue close_args; | 159 ListValue close_args; |
| 160 close_args.Append(new StringValue("")); | 160 close_args.Append(base::StringValue::New("")); |
| 161 web_ui_->CallJavascriptFunction("chrome.send", value, close_args); | 161 web_ui_->CallJavascriptFunction("chrome.send", value, close_args); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void BrowserSigninHtml::HandleSigninInit(const ListValue* args) { | 165 void BrowserSigninHtml::HandleSigninInit(const ListValue* args) { |
| 166 if (!web_ui_) | 166 if (!web_ui_) |
| 167 return; | 167 return; |
| 168 | 168 |
| 169 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); | 169 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); |
| 170 rvh->ExecuteJavascriptInWebFrame(ASCIIToUTF16("//iframe[@id='login']"), | 170 rvh->ExecuteJavascriptInWebFrame(ASCIIToUTF16("//iframe[@id='login']"), |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { | 327 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { |
| 328 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. | 328 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. |
| 329 #if defined(OS_WIN) || defined(OS_CHROMEOS) || !defined(TOOLKIT_VIEWS) | 329 #if defined(OS_WIN) || defined(OS_CHROMEOS) || !defined(TOOLKIT_VIEWS) |
| 330 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); | 330 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); |
| 331 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, | 331 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, |
| 332 html_dialog_ui_delegate_, | 332 html_dialog_ui_delegate_, |
| 333 tab_contents); | 333 tab_contents); |
| 334 #endif | 334 #endif |
| 335 } | 335 } |
| OLD | NEW |