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

Side by Side Diff: chrome/browser/android/hung_renderer_infobar_delegate.h

Issue 1299513002: [Android] Add support for a hung renderer dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 4 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
7
8 #include "components/infobars/core/confirm_infobar_delegate.h"
9
10 namespace content {
11 class WebContent;
12 }
13
14 // This class is responsible for customizing a hung renderer infobar.
15 // If the "kill" dialog is clicked, the renderer of the corresponding
16 // WebContents will be shutdown.
17 class HungRendererInfoBarDelegate : public ConfirmInfoBarDelegate {
18 public:
19 // The caller must ensure that |web_contents| outlives the delegate.
20 // This will naturally occur if the associated InfoBar is managed by the
21 // InfoBarService.
22 explicit HungRendererInfoBarDelegate(content::WebContents* web_contents);
23 ~HungRendererInfoBarDelegate() override;
24
25 // ConfirmInfoBarDelegate:
26 int GetIconID() const override;
27 base::string16 GetMessageText() const override;
28 base::string16 GetButtonLabel(InfoBarButton button) const override;
29 bool Accept() override;
30
31 private:
32 content::WebContents* web_contents_;
33
34 DISALLOW_COPY_AND_ASSIGN(HungRendererInfoBarDelegate);
35 };
36
37 #endif // CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698