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

Side by Side Diff: chrome/browser/ui/hung_plugin_tab_helper.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // |infobar_service|. Returns the infobar if it was successfully added. 133 // |infobar_service|. Returns the infobar if it was successfully added.
134 static infobars::InfoBar* Create(InfoBarService* infobar_service, 134 static infobars::InfoBar* Create(InfoBarService* infobar_service,
135 HungPluginTabHelper* helper, 135 HungPluginTabHelper* helper,
136 int plugin_child_id, 136 int plugin_child_id,
137 const base::string16& plugin_name); 137 const base::string16& plugin_name);
138 138
139 private: 139 private:
140 HungPluginInfoBarDelegate(HungPluginTabHelper* helper, 140 HungPluginInfoBarDelegate(HungPluginTabHelper* helper,
141 int plugin_child_id, 141 int plugin_child_id,
142 const base::string16& plugin_name); 142 const base::string16& plugin_name);
143 virtual ~HungPluginInfoBarDelegate(); 143 ~HungPluginInfoBarDelegate() override;
144 144
145 // ConfirmInfoBarDelegate: 145 // ConfirmInfoBarDelegate:
146 virtual int GetIconID() const override; 146 int GetIconID() const override;
147 virtual base::string16 GetMessageText() const override; 147 base::string16 GetMessageText() const override;
148 virtual int GetButtons() const override; 148 int GetButtons() const override;
149 virtual base::string16 GetButtonLabel(InfoBarButton button) const override; 149 base::string16 GetButtonLabel(InfoBarButton button) const override;
150 virtual bool Accept() override; 150 bool Accept() override;
151 151
152 HungPluginTabHelper* helper_; 152 HungPluginTabHelper* helper_;
153 int plugin_child_id_; 153 int plugin_child_id_;
154 154
155 base::string16 message_; 155 base::string16 message_;
156 base::string16 button_text_; 156 base::string16 button_text_;
157 }; 157 };
158 158
159 // static 159 // static
160 infobars::InfoBar* HungPluginInfoBarDelegate::Create( 160 infobars::InfoBar* HungPluginInfoBarDelegate::Create(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 415
416 void HungPluginTabHelper::CloseBar(PluginState* state) { 416 void HungPluginTabHelper::CloseBar(PluginState* state) {
417 InfoBarService* infobar_service = 417 InfoBarService* infobar_service =
418 InfoBarService::FromWebContents(web_contents()); 418 InfoBarService::FromWebContents(web_contents());
419 if (infobar_service && state->infobar) { 419 if (infobar_service && state->infobar) {
420 infobar_service->RemoveInfoBar(state->infobar); 420 infobar_service->RemoveInfoBar(state->infobar);
421 state->infobar = NULL; 421 state->infobar = NULL;
422 } 422 }
423 } 423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698