OLD | NEW |
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual ~HungPluginInfoBarDelegate(); |
144 | 144 |
145 // ConfirmInfoBarDelegate: | 145 // ConfirmInfoBarDelegate: |
146 virtual int GetIconID() const OVERRIDE; | 146 virtual int GetIconID() const override; |
147 virtual base::string16 GetMessageText() const OVERRIDE; | 147 virtual base::string16 GetMessageText() const override; |
148 virtual int GetButtons() const OVERRIDE; | 148 virtual int GetButtons() const override; |
149 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 149 virtual base::string16 GetButtonLabel(InfoBarButton button) const override; |
150 virtual bool Accept() OVERRIDE; | 150 virtual 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 Loading... |
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 } |
OLD | NEW |