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

Side by Side Diff: chrome/browser/ui/hung_plugin_tab_helper.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/ui/hung_plugin_tab_helper.h" 5 #include "chrome/browser/ui/hung_plugin_tab_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "content/public/browser/browser_child_process_host_iterator.h" 23 #include "content/public/browser/browser_child_process_host_iterator.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/browser/child_process_data.h" 25 #include "content/public/browser/child_process_data.h"
26 #include "content/public/browser/notification_details.h" 26 #include "content/public/browser/notification_details.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 #include "content/public/browser/plugin_service.h" 28 #include "content/public/browser/plugin_service.h"
29 #include "content/public/browser/render_process_host.h" 29 #include "content/public/browser/render_process_host.h"
30 #include "content/public/common/process_type.h" 30 #include "content/public/common/process_type.h"
31 #include "content/public/common/result_codes.h" 31 #include "content/public/common/result_codes.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(OS_WIN) 35 #if defined(OS_WIN)
35 #include "base/win/scoped_handle.h" 36 #include "base/win/scoped_handle.h"
36 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" 37 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h"
37 #endif 38 #endif
38 39
39 40
40 namespace { 41 namespace {
41 42
42 #if defined(OS_WIN) 43 #if defined(OS_WIN)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const base::string16& plugin_name); 142 const base::string16& plugin_name);
142 143
143 private: 144 private:
144 HungPluginInfoBarDelegate(HungPluginTabHelper* helper, 145 HungPluginInfoBarDelegate(HungPluginTabHelper* helper,
145 int plugin_child_id, 146 int plugin_child_id,
146 const base::string16& plugin_name); 147 const base::string16& plugin_name);
147 ~HungPluginInfoBarDelegate() override; 148 ~HungPluginInfoBarDelegate() override;
148 149
149 // ConfirmInfoBarDelegate: 150 // ConfirmInfoBarDelegate:
150 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 151 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
151 int GetIconId() const override; 152 gfx::VectorIconId GetVectorIconId() const override;
152 base::string16 GetMessageText() const override; 153 base::string16 GetMessageText() const override;
153 int GetButtons() const override; 154 int GetButtons() const override;
154 base::string16 GetButtonLabel(InfoBarButton button) const override; 155 base::string16 GetButtonLabel(InfoBarButton button) const override;
155 bool Accept() override; 156 bool Accept() override;
156 157
157 HungPluginTabHelper* helper_; 158 HungPluginTabHelper* helper_;
158 int plugin_child_id_; 159 int plugin_child_id_;
159 160
160 base::string16 message_; 161 base::string16 message_;
161 base::string16 button_text_; 162 base::string16 button_text_;
(...skipping 24 matching lines...) Expand all
186 } 187 }
187 188
188 HungPluginInfoBarDelegate::~HungPluginInfoBarDelegate() { 189 HungPluginInfoBarDelegate::~HungPluginInfoBarDelegate() {
189 } 190 }
190 191
191 infobars::InfoBarDelegate::InfoBarIdentifier 192 infobars::InfoBarDelegate::InfoBarIdentifier
192 HungPluginInfoBarDelegate::GetIdentifier() const { 193 HungPluginInfoBarDelegate::GetIdentifier() const {
193 return HUNG_PLUGIN_INFOBAR_DELEGATE; 194 return HUNG_PLUGIN_INFOBAR_DELEGATE;
194 } 195 }
195 196
196 int HungPluginInfoBarDelegate::GetIconId() const { 197 gfx::VectorIconId HungPluginInfoBarDelegate::GetVectorIconId() const {
197 return IDR_INFOBAR_PLUGIN_CRASHED; 198 return gfx::VectorIconId::EXTENSION_CRASHED;
198 } 199 }
199 200
200 base::string16 HungPluginInfoBarDelegate::GetMessageText() const { 201 base::string16 HungPluginInfoBarDelegate::GetMessageText() const {
201 return message_; 202 return message_;
202 } 203 }
203 204
204 int HungPluginInfoBarDelegate::GetButtons() const { 205 int HungPluginInfoBarDelegate::GetButtons() const {
205 return BUTTON_OK; 206 return BUTTON_OK;
206 } 207 }
207 208
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 426 }
426 427
427 void HungPluginTabHelper::CloseBar(PluginState* state) { 428 void HungPluginTabHelper::CloseBar(PluginState* state) {
428 InfoBarService* infobar_service = 429 InfoBarService* infobar_service =
429 InfoBarService::FromWebContents(web_contents()); 430 InfoBarService::FromWebContents(web_contents());
430 if (infobar_service && state->infobar) { 431 if (infobar_service && state->infobar) {
431 infobar_service->RemoveInfoBar(state->infobar); 432 infobar_service->RemoveInfoBar(state->infobar);
432 state->infobar = NULL; 433 state->infobar = NULL;
433 } 434 }
434 } 435 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/collected_cookies_infobar_delegate.cc ('k') | chrome/browser/ui/startup/default_browser_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698