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

Side by Side Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 2382563003: Remove some more desktop infobar PNGs. (Closed)
Patch Set: pkasting review Created 4 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/plugins/plugin_infobar_delegates.h" 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/grit/locale_settings.h" 23 #include "chrome/grit/locale_settings.h"
24 #include "chrome/grit/theme_resources.h" 24 #include "chrome/grit/theme_resources.h"
25 #include "components/google/core/browser/google_util.h" 25 #include "components/google/core/browser/google_util.h"
26 #include "components/infobars/core/infobar.h" 26 #include "components/infobars/core/infobar.h"
27 #include "components/strings/grit/components_strings.h" 27 #include "components/strings/grit/components_strings.h"
28 #include "content/public/browser/render_process_host.h" 28 #include "content/public/browser/render_process_host.h"
29 #include "content/public/browser/render_view_host.h" 29 #include "content/public/browser/render_view_host.h"
30 #include "content/public/browser/user_metrics.h" 30 #include "content/public/browser/user_metrics.h"
31 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
32 #include "ui/base/l10n/l10n_util.h" 32 #include "ui/base/l10n/l10n_util.h"
33 #include "ui/gfx/vector_icons_public.h"
33 34
34 #if defined(ENABLE_PLUGIN_INSTALLATION) 35 #if defined(ENABLE_PLUGIN_INSTALLATION)
35 #include "chrome/browser/plugins/plugin_installer.h" 36 #include "chrome/browser/plugins/plugin_installer.h"
36 #endif 37 #endif
37 38
38 #if defined(OS_WIN) 39 #if defined(OS_WIN)
39 #include <shellapi.h> 40 #include <shellapi.h>
40 #include "ui/base/win/shell.h" 41 #include "ui/base/win/shell.h"
41 #endif 42 #endif
42 43
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 infobars::InfoBarDelegate::InfoBarIdentifier 103 infobars::InfoBarDelegate::InfoBarIdentifier
103 OutdatedPluginInfoBarDelegate::GetIdentifier() const { 104 OutdatedPluginInfoBarDelegate::GetIdentifier() const {
104 return OUTDATED_PLUGIN_INFOBAR_DELEGATE; 105 return OUTDATED_PLUGIN_INFOBAR_DELEGATE;
105 } 106 }
106 107
107 void OutdatedPluginInfoBarDelegate::InfoBarDismissed() { 108 void OutdatedPluginInfoBarDelegate::InfoBarDismissed() {
108 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Dismissed")); 109 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Dismissed"));
109 } 110 }
110 111
111 int OutdatedPluginInfoBarDelegate::GetIconId() const { 112 gfx::VectorIconId OutdatedPluginInfoBarDelegate::GetVectorIconId() const {
112 return IDR_INFOBAR_PLUGIN_INSTALL; 113 return gfx::VectorIconId::EXTENSION;
113 } 114 }
114 115
115 base::string16 OutdatedPluginInfoBarDelegate::GetMessageText() const { 116 base::string16 OutdatedPluginInfoBarDelegate::GetMessageText() const {
116 return message_; 117 return message_;
117 } 118 }
118 119
119 base::string16 OutdatedPluginInfoBarDelegate::GetButtonLabel( 120 base::string16 OutdatedPluginInfoBarDelegate::GetButtonLabel(
120 InfoBarButton button) const { 121 InfoBarButton button) const {
121 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? 122 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
122 IDS_PLUGIN_UPDATE : IDS_PLUGIN_ENABLE_TEMPORARILY); 123 IDS_PLUGIN_UPDATE : IDS_PLUGIN_ENABLE_TEMPORARILY);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const base::string16& message) { 205 const base::string16& message) {
205 DCHECK(infobar->owner()); 206 DCHECK(infobar->owner());
206 infobar->owner()->ReplaceInfoBar( 207 infobar->owner()->ReplaceInfoBar(
207 infobar, infobar->owner()->CreateConfirmInfoBar( 208 infobar, infobar->owner()->CreateConfirmInfoBar(
208 std::unique_ptr<ConfirmInfoBarDelegate>( 209 std::unique_ptr<ConfirmInfoBarDelegate>(
209 new OutdatedPluginInfoBarDelegate( 210 new OutdatedPluginInfoBarDelegate(
210 installer, std::move(plugin_metadata), message)))); 211 installer, std::move(plugin_metadata), message))));
211 } 212 }
212 213
213 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 214 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698