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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 virtual std::string GetDialogArgs() const { | 104 virtual std::string GetDialogArgs() const { |
105 return UTF16ToASCII(login_message_); | 105 return UTF16ToASCII(login_message_); |
106 } | 106 } |
107 virtual void OnDialogClosed(const std::string& json_retval) { | 107 virtual void OnDialogClosed(const std::string& json_retval) { |
108 closed_ = true; | 108 closed_ = true; |
109 signin_->Cancel(); | 109 signin_->Cancel(); |
110 } | 110 } |
111 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { | 111 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { |
112 } | 112 } |
| 113 virtual bool ShouldShowDialogTitle() const { return true; } |
113 | 114 |
114 // DOMMessageHandler implementation. | 115 // DOMMessageHandler implementation. |
115 virtual void RegisterMessages(); | 116 virtual void RegisterMessages(); |
116 | 117 |
117 // Refreshes the UI, such as after an authentication error. | 118 // Refreshes the UI, such as after an authentication error. |
118 void ReloadUI(); | 119 void ReloadUI(); |
119 | 120 |
120 // Method which calls into javascript to force the dialog to close. | 121 // Method which calls into javascript to force the dialog to close. |
121 void ForceDialogClose(); | 122 void ForceDialogClose(); |
122 | 123 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 322 |
322 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { | 323 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { |
323 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. | 324 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. |
324 #if defined(OS_WIN) || !defined(TOOLKIT_VIEWS) | 325 #if defined(OS_WIN) || !defined(TOOLKIT_VIEWS) |
325 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); | 326 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); |
326 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, | 327 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, |
327 html_dialog_ui_delegate_, | 328 html_dialog_ui_delegate_, |
328 tab_contents); | 329 tab_contents); |
329 #endif | 330 #endif |
330 } | 331 } |
OLD | NEW |