OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 virtual std::string GetDialogArgs() const { | 103 virtual std::string GetDialogArgs() const { |
104 return UTF16ToASCII(login_message_); | 104 return UTF16ToASCII(login_message_); |
105 } | 105 } |
106 virtual void OnDialogClosed(const std::string& json_retval) { | 106 virtual void OnDialogClosed(const std::string& json_retval) { |
107 closed_ = true; | 107 closed_ = true; |
108 signin_->Cancel(); | 108 signin_->Cancel(); |
109 } | 109 } |
110 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { | 110 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { |
111 } | 111 } |
| 112 virtual bool ShouldShowDialogTitle() const { return true; } |
112 | 113 |
113 // DOMMessageHandler implementation. | 114 // DOMMessageHandler implementation. |
114 virtual void RegisterMessages(); | 115 virtual void RegisterMessages(); |
115 | 116 |
116 // Refreshes the UI, such as after an authentication error. | 117 // Refreshes the UI, such as after an authentication error. |
117 void ReloadUI(); | 118 void ReloadUI(); |
118 | 119 |
119 // Method which calls into javascript to force the dialog to close. | 120 // Method which calls into javascript to force the dialog to close. |
120 void ForceDialogClose(); | 121 void ForceDialogClose(); |
121 | 122 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 306 |
306 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { | 307 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { |
307 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. | 308 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. |
308 #if defined(OS_WIN) || !defined(TOOLKIT_VIEWS) | 309 #if defined(OS_WIN) || !defined(TOOLKIT_VIEWS) |
309 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); | 310 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); |
310 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, | 311 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, |
311 html_dialog_ui_delegate_, | 312 html_dialog_ui_delegate_, |
312 tab_contents); | 313 tab_contents); |
313 #endif | 314 #endif |
314 } | 315 } |
OLD | NEW |