Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/ui/views/conflicting_module_view_win.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix weird formatting in recent_tabs_sub_menu_model.cc Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 bubble_shown.SetValue(bubble_shown.GetValue() + 1); 109 bubble_shown.SetValue(bubble_shown.GetValue() + 1);
110 } 110 }
111 111
112 void ConflictingModuleView::OnWidgetClosing(views::Widget* widget) { 112 void ConflictingModuleView::OnWidgetClosing(views::Widget* widget) {
113 views::BubbleDialogDelegateView::OnWidgetClosing(widget); 113 views::BubbleDialogDelegateView::OnWidgetClosing(widget);
114 content::RecordAction( 114 content::RecordAction(
115 UserMetricsAction("ConflictingModuleNotificationDismissed")); 115 UserMetricsAction("ConflictingModuleNotificationDismissed"));
116 } 116 }
117 117
118 bool ConflictingModuleView::Accept() { 118 bool ConflictingModuleView::Accept() {
119 browser_->OpenURL(content::OpenURLParams( 119 browser_->OpenURL(
120 help_center_url_, content::Referrer(), NEW_FOREGROUND_TAB, 120 content::OpenURLParams(help_center_url_, content::Referrer(),
121 ui::PAGE_TRANSITION_LINK, false)); 121 WindowOpenDisposition::NEW_FOREGROUND_TAB,
122 ui::PAGE_TRANSITION_LINK, false));
122 EnumerateModulesModel::GetInstance()->AcknowledgeConflictNotification(); 123 EnumerateModulesModel::GetInstance()->AcknowledgeConflictNotification();
123 return true; 124 return true;
124 } 125 }
125 126
126 base::string16 ConflictingModuleView::GetDialogButtonLabel( 127 base::string16 ConflictingModuleView::GetDialogButtonLabel(
127 ui::DialogButton button) const { 128 ui::DialogButton button) const {
128 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK 129 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
129 ? IDS_CONFLICTS_LEARN_MORE 130 ? IDS_CONFLICTS_LEARN_MORE
130 : IDS_NOT_NOW); 131 : IDS_NOT_NOW);
131 } 132 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 166
166 void ConflictingModuleView::Observe( 167 void ConflictingModuleView::Observe(
167 int type, 168 int type,
168 const content::NotificationSource& source, 169 const content::NotificationSource& source,
169 const content::NotificationDetails& details) { 170 const content::NotificationDetails& details) {
170 DCHECK_EQ(chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_ICON_CHANGE, type); 171 DCHECK_EQ(chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_ICON_CHANGE, type);
171 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); 172 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance();
172 if (!model->ShouldShowConflictWarning()) 173 if (!model->ShouldShowConflictWarning())
173 GetWidget()->Close(); 174 GetWidget()->Close();
174 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698