| 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 // The background color is painted by the main view on some ports. |
| 22 static SkColor ContentsBackgroundColor(); |
| 23 |
| 21 private: | 24 private: |
| 22 // views::BubbleBorder2 overrides: | 25 // views::BubbleBorder2 overrides: |
| 23 virtual void PaintBackground(gfx::Canvas* canvas, | 26 virtual void PaintBackground(gfx::Canvas* canvas, |
| 24 const gfx::Rect& bounds) const OVERRIDE; | 27 const gfx::Rect& bounds) const OVERRIDE; |
| 25 | 28 |
| 26 // AppListView hosted inside this bubble. | 29 // AppListView hosted inside this bubble. |
| 27 const views::View* app_list_view_; // Owned by views hierarchy. | 30 const views::View* app_list_view_; // Owned by views hierarchy. |
| 28 | 31 |
| 29 // Children view of AppListView that needs to paint background. | 32 // Children view of AppListView that needs to paint background. |
| 30 const views::View* search_box_view_; // Owned by views hierarchy. | 33 const views::View* search_box_view_; // Owned by views hierarchy. |
| 31 | 34 |
| 32 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder); | 35 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder); |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 } // namespace app_list | 38 } // namespace app_list |
| 36 | 39 |
| 37 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ | 40 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ |
| OLD | NEW |