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_VIEWS_APP_LIST_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 class Observer { | 33 class Observer { |
34 public: | 34 public: |
35 virtual void OnActivationChanged(views::Widget* widget, bool active) = 0; | 35 virtual void OnActivationChanged(views::Widget* widget, bool active) = 0; |
36 }; | 36 }; |
37 | 37 |
38 // Takes ownership of |delegate|. | 38 // Takes ownership of |delegate|. |
39 explicit AppListView(AppListViewDelegate* delegate); | 39 explicit AppListView(AppListViewDelegate* delegate); |
40 virtual ~AppListView(); | 40 virtual ~AppListView(); |
41 | 41 |
42 // Initializes the widget. | 42 // Initializes the widget. |
43 // If an |anchor| is provided, the |anchor_point| is a local offset, otherwise | |
44 // it is the anchor point in screen coordinates. | |
43 void InitAsBubble(gfx::NativeView parent, | 45 void InitAsBubble(gfx::NativeView parent, |
44 PaginationModel* pagination_model, | 46 PaginationModel* pagination_model, |
45 views::View* anchor, | 47 views::View* anchor, |
46 const gfx::Point& anchor_point, | 48 const gfx::Point& anchor_point, |
James Cook
2013/09/05 20:05:17
I don't like having a parameter that can be in two
Mr4D (OOO till 08-26)
2013/09/05 20:52:00
I did like none of the three possibilities. Okay -
| |
47 views::BubbleBorder::Arrow arrow, | 49 views::BubbleBorder::Arrow arrow, |
48 bool border_accepts_events); | 50 bool border_accepts_events); |
49 | 51 |
50 void SetBubbleArrow(views::BubbleBorder::Arrow arrow); | 52 void SetBubbleArrow(views::BubbleBorder::Arrow arrow); |
51 | 53 |
52 void SetAnchorPoint(const gfx::Point& anchor_point); | 54 void SetAnchorPoint(const gfx::Point& anchor_point); |
53 | 55 |
54 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop | 56 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop |
55 // operations outside the application list. This has to be called after | 57 // operations outside the application list. This has to be called after |
56 // InitAsBubble was called since the app list object needs to exist so that | 58 // InitAsBubble was called since the app list object needs to exist so that |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 SigninView* signin_view_; | 121 SigninView* signin_view_; |
120 | 122 |
121 ObserverList<Observer> observers_; | 123 ObserverList<Observer> observers_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(AppListView); | 125 DISALLOW_COPY_AND_ASSIGN(AppListView); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace app_list | 128 } // namespace app_list |
127 | 129 |
128 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 130 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |