| 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 #ifndef CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" | 9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" |
| 10 #include "ui/views/bubble/bubble_delegate.h" | 10 #include "ui/views/bubble/bubble_delegate.h" |
| 11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 12 | 12 |
| 13 class Browser; | 13 class Browser; |
| 14 class GlobalErrorWithStandardBubble; | 14 class GlobalErrorWithStandardBubble; |
| 15 | 15 |
| 16 class GlobalErrorBubbleView : public views::ButtonListener, | 16 class GlobalErrorBubbleView : public views::ButtonListener, |
| 17 public views::BubbleDelegateView, | 17 public views::BubbleDelegateView, |
| 18 public GlobalErrorBubbleViewBase { | 18 public GlobalErrorBubbleViewBase { |
| 19 public: | 19 public: |
| 20 GlobalErrorBubbleView( | 20 GlobalErrorBubbleView( |
| 21 views::View* anchor_view, | 21 views::View* anchor_view, |
| 22 views::BubbleBorder::Arrow arrow, | 22 views::BubbleBorder::Arrow arrow, |
| 23 Browser* browser, | 23 Browser* browser, |
| 24 const base::WeakPtr<GlobalErrorWithStandardBubble>& error); | 24 const base::WeakPtr<GlobalErrorWithStandardBubble>& error); |
| 25 virtual ~GlobalErrorBubbleView(); | 25 ~GlobalErrorBubbleView() override; |
| 26 | 26 |
| 27 // views::ButtonListener implementation. | 27 // views::ButtonListener implementation. |
| 28 virtual void ButtonPressed(views::Button* sender, | 28 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 29 const ui::Event& event) override; | |
| 30 | 29 |
| 31 // views::WidgetDelegate implementation. | 30 // views::WidgetDelegate implementation. |
| 32 virtual void WindowClosing() override; | 31 void WindowClosing() override; |
| 33 | 32 |
| 34 // GlobalErrorBubbleViewBase implementation. | 33 // GlobalErrorBubbleViewBase implementation. |
| 35 virtual void CloseBubbleView() override; | 34 void CloseBubbleView() override; |
| 36 | 35 |
| 37 private: | 36 private: |
| 38 Browser* browser_; | 37 Browser* browser_; |
| 39 base::WeakPtr<GlobalErrorWithStandardBubble> error_; | 38 base::WeakPtr<GlobalErrorWithStandardBubble> error_; |
| 40 | 39 |
| 41 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView); | 40 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView); |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ | 43 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ |
| OLD | NEW |