| 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 "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 DCHECK(bubble_reference_); | 113 DCHECK(bubble_reference_); |
| 114 | 114 |
| 115 chooser_content_view_ = new ChooserContentView(this, chooser_controller_); | 115 chooser_content_view_ = new ChooserContentView(this, chooser_controller_); |
| 116 } | 116 } |
| 117 | 117 |
| 118 ChooserBubbleUiViewDelegate::~ChooserBubbleUiViewDelegate() {} | 118 ChooserBubbleUiViewDelegate::~ChooserBubbleUiViewDelegate() {} |
| 119 | 119 |
| 120 base::string16 ChooserBubbleUiViewDelegate::GetWindowTitle() const { | 120 base::string16 ChooserBubbleUiViewDelegate::GetWindowTitle() const { |
| 121 return l10n_util::GetStringFUTF16( | 121 return l10n_util::GetStringFUTF16( |
| 122 IDS_CHOOSER_BUBBLE_PROMPT, | 122 IDS_DEVICE_CHOOSER_PROMPT, |
| 123 url_formatter::FormatOriginForSecurityDisplay( | 123 url_formatter::FormatOriginForSecurityDisplay( |
| 124 chooser_controller_->GetOrigin(), | 124 chooser_controller_->GetOrigin(), |
| 125 url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); | 125 url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 base::string16 ChooserBubbleUiViewDelegate::GetDialogButtonLabel( | 128 base::string16 ChooserBubbleUiViewDelegate::GetDialogButtonLabel( |
| 129 ui::DialogButton button) const { | 129 ui::DialogButton button) const { |
| 130 return chooser_content_view_->GetDialogButtonLabel(button); | 130 return chooser_content_view_->GetDialogButtonLabel(button); |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 return browser_view->exclusive_access_bubble()->GetView(); | 241 return browser_view->exclusive_access_bubble()->GetView(); |
| 242 | 242 |
| 243 return browser_view->top_container(); | 243 return browser_view->top_container(); |
| 244 } | 244 } |
| 245 | 245 |
| 246 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { | 246 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { |
| 247 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) | 247 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) |
| 248 return views::BubbleBorder::TOP_LEFT; | 248 return views::BubbleBorder::TOP_LEFT; |
| 249 return views::BubbleBorder::NONE; | 249 return views::BubbleBorder::NONE; |
| 250 } | 250 } |
| OLD | NEW |