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 #include "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "ui/app_list/app_list_constants.h" | 8 #include "ui/app_list/app_list_constants.h" |
9 #include "ui/app_list/app_list_model.h" | 9 #include "ui/app_list/app_list_model.h" |
10 #include "ui/app_list/app_list_view_delegate.h" | 10 #include "ui/app_list/app_list_view_delegate.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); | 121 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); |
122 SizeToContents(); // Recalcuates with new border. | 122 SizeToContents(); // Recalcuates with new border. |
123 GetBubbleFrameView()->SchedulePaint(); | 123 GetBubbleFrameView()->SchedulePaint(); |
124 } | 124 } |
125 | 125 |
126 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { | 126 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { |
127 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); | 127 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); |
128 SizeToContents(); // Repositions view relative to the anchor. | 128 SizeToContents(); // Repositions view relative to the anchor. |
129 } | 129 } |
130 | 130 |
131 void AppListView::SetDragAndDropHostOfCurrentAppList( | |
132 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { | |
133 CHECK(app_list_main_view_); | |
134 app_list_main_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); | |
135 } | |
136 | |
131 void AppListView::ShowWhenReady() { | 137 void AppListView::ShowWhenReady() { |
132 app_list_main_view_->ShowAppListWhenReady(); | 138 app_list_main_view_->ShowAppListWhenReady(); |
133 } | 139 } |
134 | 140 |
135 void AppListView::Close() { | 141 void AppListView::Close() { |
136 app_list_main_view_->Close(); | 142 app_list_main_view_->Close(); |
137 | 143 app_list_main_view_ = NULL; |
koz (OOO until 15th September)
2013/05/08 02:00:39
I don't think we want to set this to NULL because
Mr4D (OOO till 08-26)
2013/05/08 02:53:35
Done.
| |
138 if (delegate_) | 144 if (delegate_) |
139 delegate_->Dismiss(); | 145 delegate_->Dismiss(); |
140 else | 146 else |
141 GetWidget()->Close(); | 147 GetWidget()->Close(); |
142 } | 148 } |
143 | 149 |
144 void AppListView::UpdateBounds() { | 150 void AppListView::UpdateBounds() { |
145 SizeToContents(); | 151 SizeToContents(); |
146 } | 152 } |
147 | 153 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
238 | 244 |
239 void AppListView::OnSigninSuccess() { | 245 void AppListView::OnSigninSuccess() { |
240 OnSigninStatusChanged(); | 246 OnSigninStatusChanged(); |
241 } | 247 } |
242 | 248 |
243 SigninDelegate* AppListView::GetSigninDelegate() { | 249 SigninDelegate* AppListView::GetSigninDelegate() { |
244 return delegate_ ? delegate_->GetSigninDelegate() : NULL; | 250 return delegate_ ? delegate_->GetSigninDelegate() : NULL; |
245 } | 251 } |
246 | 252 |
247 } // namespace app_list | 253 } // namespace app_list |
OLD | NEW |