OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 class GlobalError; | 13 class GlobalError; |
14 | 14 |
15 class GlobalErrorBubbleView : public views::ButtonListener, | 15 class GlobalErrorBubbleView : public views::ButtonListener, |
16 public views::BubbleDelegateView { | 16 public views::BubbleDelegateView { |
17 public: | 17 public: |
18 GlobalErrorBubbleView(views::View* anchor_view, | 18 GlobalErrorBubbleView(views::View* anchor_view, |
19 views::BubbleBorder::ArrowLocation location, | 19 views::BubbleBorder::ArrowLocation location, |
20 const SkColor& color, | 20 const SkColor& color, |
21 Browser* browser, | 21 Browser* browser, |
22 GlobalError* error); | 22 GlobalError* error); |
23 virtual ~GlobalErrorBubbleView(); | 23 virtual ~GlobalErrorBubbleView(); |
24 | 24 |
25 // views::BubbleDelegateView implementation. | 25 // views::BubbleDelegateView implementation. |
26 virtual gfx::Point GetAnchorPoint() OVERRIDE; | 26 virtual gfx::Rect GetAnchorRect() OVERRIDE; |
27 | 27 |
28 // views::ButtonListener implementation. | 28 // views::ButtonListener implementation. |
29 virtual void ButtonPressed(views::Button* sender, | 29 virtual void ButtonPressed(views::Button* sender, |
30 const views::Event& event) OVERRIDE; | 30 const views::Event& event) OVERRIDE; |
31 | 31 |
32 // views::WidgetDelegate implementation. | 32 // views::WidgetDelegate implementation. |
33 virtual void WindowClosing() OVERRIDE; | 33 virtual void WindowClosing() OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 Browser* browser_; | 36 Browser* browser_; |
37 GlobalError* error_; | 37 GlobalError* error_; |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView); | 39 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView); |
40 }; | 40 }; |
41 | 41 |
42 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ | 42 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ |
OLD | NEW |