| Index: chrome/browser/android/hung_renderer_infobar_delegate.h
|
| diff --git a/chrome/browser/android/hung_renderer_infobar_delegate.h b/chrome/browser/android/hung_renderer_infobar_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ca3868eb79596d72cc1849d5038d962c4b5e33b5
|
| --- /dev/null
|
| +++ b/chrome/browser/android/hung_renderer_infobar_delegate.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
|
| +#define CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
|
| +
|
| +#include "components/infobars/core/confirm_infobar_delegate.h"
|
| +
|
| +namespace content {
|
| +class WebContent;
|
| +}
|
| +
|
| +// This class is responsible for customizing a hung renderer infobar.
|
| +// If the "kill" dialog is clicked, the renderer of the corresponding
|
| +// WebContents will be shutdown.
|
| +class HungRendererInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| + public:
|
| + // The caller must ensure that |web_contents| outlives the delegate.
|
| + // This will naturally occur if the associated InfoBar is managed by the
|
| + // InfoBarService.
|
| + explicit HungRendererInfoBarDelegate(content::WebContents* web_contents);
|
| + ~HungRendererInfoBarDelegate() override;
|
| +
|
| + // ConfirmInfoBarDelegate:
|
| + int GetIconID() const override;
|
| + base::string16 GetMessageText() const override;
|
| + base::string16 GetButtonLabel(InfoBarButton button) const override;
|
| + bool Accept() override;
|
| +
|
| + private:
|
| + content::WebContents* web_contents_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(HungRendererInfoBarDelegate);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
|
|
|