| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
| 6 #define CHROME_BROWSER_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/gfx/rect.h" | 8 #include "base/gfx/rect.h" |
| 9 #include "chrome/browser/status_bubble.h" | 9 #include "chrome/browser/status_bubble.h" |
| 10 #include "chrome/views/widget/widget.h" | 10 #include "chrome/views/widget/widget.h" |
| 11 #include "chrome/views/widget/widget_win.h" | 11 #include "chrome/views/widget/widget_win.h" |
| 12 | 12 |
| 13 class GURL; | 13 class GURL; |
| 14 | 14 |
| 15 // StatusBubble displays a bubble of text that fades in, hovers over the | 15 // StatusBubble displays a bubble of text that fades in, hovers over the |
| 16 // browser chrome and fades away when not needed. It is primarily designed | 16 // browser chrome and fades away when not needed. It is primarily designed |
| 17 // to allow users to see where hovered links point to. | 17 // to allow users to see where hovered links point to. |
| 18 class StatusBubbleViews : public StatusBubble { | 18 class StatusBubbleViews : public StatusBubble { |
| 19 public: | 19 public: |
| 20 // How wide the bubble's shadow is. |
| 21 static const int kShadowThickness; |
| 22 |
| 20 explicit StatusBubbleViews(views::Widget* frame); | 23 explicit StatusBubbleViews(views::Widget* frame); |
| 21 ~StatusBubbleViews(); | 24 ~StatusBubbleViews(); |
| 22 | 25 |
| 23 // Set the bounds of the bubble relative to the browser window. | 26 // Set the bounds of the bubble relative to the browser window. |
| 24 void SetBounds(int x, int y, int w, int h); | 27 void SetBounds(int x, int y, int w, int h); |
| 25 | 28 |
| 26 // Reposition the bubble - as we are using a WS_POPUP for the bubble, | 29 // Reposition the bubble - as we are using a WS_POPUP for the bubble, |
| 27 // we have to manually position it when the browser window moves. | 30 // we have to manually position it when the browser window moves. |
| 28 void Reposition(); | 31 void Reposition(); |
| 29 | 32 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 scoped_ptr<views::WidgetWin> popup_; | 64 scoped_ptr<views::WidgetWin> popup_; |
| 62 double opacity_; | 65 double opacity_; |
| 63 | 66 |
| 64 views::Widget* frame_; | 67 views::Widget* frame_; |
| 65 StatusView* view_; | 68 StatusView* view_; |
| 66 | 69 |
| 67 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); | 70 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); |
| 68 }; | 71 }; |
| 69 | 72 |
| 70 #endif // CHROME_BROWSER_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 73 #endif // CHROME_BROWSER_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
| OLD | NEW |