| 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_VIEW_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_VIEW_H_ |
| 6 #define UI_APP_LIST_APP_LIST_VIEW_H_ | 6 #define UI_APP_LIST_APP_LIST_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/app_list/app_list_export.h" | 9 #include "ui/app_list/app_list_export.h" |
| 10 #include "ui/app_list/search_box_view_delegate.h" | 10 #include "ui/app_list/search_box_view_delegate.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public SearchResultListViewDelegate { | 29 public SearchResultListViewDelegate { |
| 30 public: | 30 public: |
| 31 // Takes ownership of |delegate|. | 31 // Takes ownership of |delegate|. |
| 32 explicit AppListView(AppListViewDelegate* delegate); | 32 explicit AppListView(AppListViewDelegate* delegate); |
| 33 virtual ~AppListView(); | 33 virtual ~AppListView(); |
| 34 | 34 |
| 35 // Initializes the widget. | 35 // Initializes the widget. |
| 36 void InitAsBubble(gfx::NativeView parent, | 36 void InitAsBubble(gfx::NativeView parent, |
| 37 PaginationModel* pagination_model, | 37 PaginationModel* pagination_model, |
| 38 views::View* anchor, | 38 views::View* anchor, |
| 39 const gfx::Point& anchor_point, |
| 39 views::BubbleBorder::ArrowLocation arrow_location); | 40 views::BubbleBorder::ArrowLocation arrow_location); |
| 40 | 41 |
| 41 void SetBubbleArrowLocation( | 42 void SetBubbleArrowLocation( |
| 42 views::BubbleBorder::ArrowLocation arrow_location); | 43 views::BubbleBorder::ArrowLocation arrow_location); |
| 43 | 44 |
| 44 void Close(); | 45 void Close(); |
| 45 | 46 |
| 46 void UpdateBounds(); | 47 void UpdateBounds(); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 // Creates models to use. | 50 // Creates models to use. |
| 50 void CreateModel(); | 51 void CreateModel(); |
| 51 | 52 |
| 52 // Overridden from views::WidgetDelegateView: | 53 // Overridden from views::WidgetDelegateView: |
| 53 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 54 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| 55 virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE; |
| 54 virtual bool HasHitTestMask() const OVERRIDE; | 56 virtual bool HasHitTestMask() const OVERRIDE; |
| 55 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; | 57 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; |
| 56 | 58 |
| 57 // Overridden from views::View: | 59 // Overridden from views::View: |
| 58 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 60 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 59 | 61 |
| 60 // Overridden from views::ButtonListener: | 62 // Overridden from views::ButtonListener: |
| 61 virtual void ButtonPressed(views::Button* sender, | 63 virtual void ButtonPressed(views::Button* sender, |
| 62 const ui::Event& event) OVERRIDE; | 64 const ui::Event& event) OVERRIDE; |
| 63 | 65 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 AppListBubbleBorder* bubble_border_; // Owned by views hierarchy. | 82 AppListBubbleBorder* bubble_border_; // Owned by views hierarchy. |
| 81 SearchBoxView* search_box_view_; // Owned by views hierarchy. | 83 SearchBoxView* search_box_view_; // Owned by views hierarchy. |
| 82 ContentsView* contents_view_; // Owned by views hierarchy. | 84 ContentsView* contents_view_; // Owned by views hierarchy. |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(AppListView); | 86 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace app_list | 89 } // namespace app_list |
| 88 | 90 |
| 89 #endif // UI_APP_LIST_APP_LIST_VIEW_H_ | 91 #endif // UI_APP_LIST_APP_LIST_VIEW_H_ |
| OLD | NEW |