Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / global_error_bubble_view.h
blobb55dd4500b88c2da5b823f8135cdad2dd1e1bc88
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
10 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/controls/button/button.h"
13 class Browser;
14 class ElevationIconSetter;
15 class GlobalErrorWithStandardBubble;
17 class GlobalErrorBubbleView : public views::ButtonListener,
18 public views::BubbleDelegateView,
19 public GlobalErrorBubbleViewBase {
20 public:
21 GlobalErrorBubbleView(
22 views::View* anchor_view,
23 views::BubbleBorder::Arrow arrow,
24 Browser* browser,
25 const base::WeakPtr<GlobalErrorWithStandardBubble>& error);
26 ~GlobalErrorBubbleView() override;
28 // views::ButtonListener implementation.
29 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
31 // views::WidgetDelegate implementation.
32 base::string16 GetWindowTitle() const override;
33 gfx::ImageSkia GetWindowIcon() override;
34 bool ShouldShowWindowIcon() const override;
35 void WindowClosing() override;
37 // views::BubbleDelegateView implementation.
38 bool ShouldShowCloseButton() const override;
40 // GlobalErrorBubbleViewBase implementation.
41 void CloseBubbleView() override;
43 private:
44 Browser* browser_;
45 base::WeakPtr<GlobalErrorWithStandardBubble> error_;
47 scoped_ptr<ElevationIconSetter> elevation_icon_setter_;
49 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView);
52 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_