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 UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ |
6 #define UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ | 6 #define UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ui/gfx/shadow_value.h" | 9 #include "ui/gfx/shadow_value.h" |
10 #include "ui/views/bubble/bubble_border_2.h" | 10 #include "ui/views/bubble/bubble_border_2.h" |
11 | 11 |
12 namespace app_list { | 12 namespace app_list { |
13 | 13 |
14 // A class to paint bubble border and background. | 14 // A class to paint bubble border and background. |
15 class AppListBubbleBorder : public views::BubbleBorder2 { | 15 class AppListBubbleBorder : public views::BubbleBorder2 { |
16 public: | 16 public: |
17 AppListBubbleBorder(views::View* app_list_view, | 17 AppListBubbleBorder(views::View* app_list_view, |
18 views::View* search_box_view); | 18 views::View* search_box_view); |
19 virtual ~AppListBubbleBorder(); | 19 virtual ~AppListBubbleBorder(); |
20 | 20 |
21 private: | 21 private: |
22 // views::ImagelessBubbleBorder overrides: | 22 // views::BubbleBorder2 overrides: |
23 void PaintBackground(gfx::Canvas* canvas, | 23 virtual void PaintBackground(gfx::Canvas* canvas, |
24 const gfx::Rect& bounds) const; | 24 const gfx::Rect& bounds) const OVERRIDE; |
25 | 25 |
26 // AppListView hosted inside this bubble. | 26 // AppListView hosted inside this bubble. |
27 const views::View* app_list_view_; // Owned by views hierarchy. | 27 const views::View* app_list_view_; // Owned by views hierarchy. |
28 | 28 |
29 // Children view of AppListView that needs to paint background. | 29 // Children view of AppListView that needs to paint background. |
30 const views::View* search_box_view_; // Owned by views hierarchy. | 30 const views::View* search_box_view_; // Owned by views hierarchy. |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder); | 32 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace app_list | 35 } // namespace app_list |
36 | 36 |
37 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ | 37 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ |
OLD | NEW |