OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/conflicting_module_view_win.h" | 5 #include "chrome/browser/ui/views/conflicting_module_view_win.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bubble_shown.SetValue(bubble_shown.GetValue() + 1); | 108 bubble_shown.SetValue(bubble_shown.GetValue() + 1); |
109 } | 109 } |
110 | 110 |
111 void ConflictingModuleView::OnWidgetClosing(views::Widget* widget) { | 111 void ConflictingModuleView::OnWidgetClosing(views::Widget* widget) { |
112 views::BubbleDialogDelegateView::OnWidgetClosing(widget); | 112 views::BubbleDialogDelegateView::OnWidgetClosing(widget); |
113 content::RecordAction( | 113 content::RecordAction( |
114 UserMetricsAction("ConflictingModuleNotificationDismissed")); | 114 UserMetricsAction("ConflictingModuleNotificationDismissed")); |
115 } | 115 } |
116 | 116 |
117 bool ConflictingModuleView::Accept() { | 117 bool ConflictingModuleView::Accept() { |
118 browser_->OpenURL(content::OpenURLParams( | 118 browser_->OpenURL( |
119 help_center_url_, content::Referrer(), NEW_FOREGROUND_TAB, | 119 content::OpenURLParams(help_center_url_, content::Referrer(), |
120 ui::PAGE_TRANSITION_LINK, false)); | 120 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 121 ui::PAGE_TRANSITION_LINK, false)); |
121 EnumerateModulesModel::GetInstance()->AcknowledgeConflictNotification(); | 122 EnumerateModulesModel::GetInstance()->AcknowledgeConflictNotification(); |
122 return true; | 123 return true; |
123 } | 124 } |
124 | 125 |
125 base::string16 ConflictingModuleView::GetDialogButtonLabel( | 126 base::string16 ConflictingModuleView::GetDialogButtonLabel( |
126 ui::DialogButton button) const { | 127 ui::DialogButton button) const { |
127 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK | 128 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK |
128 ? IDS_CONFLICTS_LEARN_MORE | 129 ? IDS_CONFLICTS_LEARN_MORE |
129 : IDS_NOT_NOW); | 130 : IDS_NOT_NOW); |
130 } | 131 } |
(...skipping 29 matching lines...) Expand all Loading... |
160 void ConflictingModuleView::GetAccessibleState( | 161 void ConflictingModuleView::GetAccessibleState( |
161 ui::AXViewState* state) { | 162 ui::AXViewState* state) { |
162 state->role = ui::AX_ROLE_ALERT_DIALOG; | 163 state->role = ui::AX_ROLE_ALERT_DIALOG; |
163 } | 164 } |
164 | 165 |
165 void ConflictingModuleView::OnConflictsAcknowledged() { | 166 void ConflictingModuleView::OnConflictsAcknowledged() { |
166 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); | 167 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); |
167 if (!model->ShouldShowConflictWarning()) | 168 if (!model->ShouldShowConflictWarning()) |
168 GetWidget()->Close(); | 169 GetWidget()->Close(); |
169 } | 170 } |
OLD | NEW |