Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/views/website_settings/chooser_bubble_ui_view.h" | 5 #include "chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 186 chooser_table_model_->SetObserver(nullptr); | 186 chooser_table_model_->SetObserver(nullptr); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool ChooserBubbleUiViewDelegate::ShouldShowWindowTitle() const { | 189 bool ChooserBubbleUiViewDelegate::ShouldShowWindowTitle() const { |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 | 192 |
| 193 base::string16 ChooserBubbleUiViewDelegate::GetWindowTitle() const { | 193 base::string16 ChooserBubbleUiViewDelegate::GetWindowTitle() const { |
| 194 return l10n_util::GetStringFUTF16( | 194 return l10n_util::GetStringFUTF16( |
| 195 IDS_CHOOSER_BUBBLE_PROMPT, | 195 IDS_CHOOSER_BUBBLE_PROMPT, |
| 196 base::ASCIIToUTF16(controller_->GetOrigin().Serialize())); | 196 base::ASCIIToUTF16(controller_->GetOrigin().host())); |
|
palmer
2016/05/06 21:18:08
We are trying to standardize on FormatUrlForSecuri
juncai
2016/05/10 22:40:25
Done.
| |
| 197 } | 197 } |
| 198 | 198 |
| 199 base::string16 ChooserBubbleUiViewDelegate::GetDialogButtonLabel( | 199 base::string16 ChooserBubbleUiViewDelegate::GetDialogButtonLabel( |
| 200 ui::DialogButton button) const { | 200 ui::DialogButton button) const { |
| 201 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK | 201 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK |
| 202 ? IDS_CHOOSER_BUBBLE_CONNECT_BUTTON_TEXT | 202 ? IDS_CHOOSER_BUBBLE_CONNECT_BUTTON_TEXT |
| 203 : IDS_CHOOSER_BUBBLE_CANCEL_BUTTON_TEXT); | 203 : IDS_CHOOSER_BUBBLE_CANCEL_BUTTON_TEXT); |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool ChooserBubbleUiViewDelegate::IsDialogButtonEnabled( | 206 bool ChooserBubbleUiViewDelegate::IsDialogButtonEnabled( |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 return browser_view->exclusive_access_bubble()->GetView(); | 381 return browser_view->exclusive_access_bubble()->GetView(); |
| 382 | 382 |
| 383 return browser_view->top_container(); | 383 return browser_view->top_container(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { | 386 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { |
| 387 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) | 387 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) |
| 388 return views::BubbleBorder::TOP_LEFT; | 388 return views::BubbleBorder::TOP_LEFT; |
| 389 return views::BubbleBorder::NONE; | 389 return views::BubbleBorder::NONE; |
| 390 } | 390 } |
| OLD | NEW |