Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: ui/app_list/views/app_list_view.cc

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 app_list_main_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
134 }
135
131 void AppListView::ShowWhenReady() { 136 void AppListView::ShowWhenReady() {
132 app_list_main_view_->ShowAppListWhenReady(); 137 app_list_main_view_->ShowAppListWhenReady();
133 } 138 }
134 139
135 void AppListView::Close() { 140 void AppListView::Close() {
136 app_list_main_view_->Close(); 141 app_list_main_view_->Close();
137
138 if (delegate_) 142 if (delegate_)
139 delegate_->Dismiss(); 143 delegate_->Dismiss();
140 else 144 else
141 GetWidget()->Close(); 145 GetWidget()->Close();
142 } 146 }
143 147
144 void AppListView::UpdateBounds() { 148 void AppListView::UpdateBounds() {
145 SizeToContents(); 149 SizeToContents();
146 } 150 }
147 151
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 242
239 void AppListView::OnSigninSuccess() { 243 void AppListView::OnSigninSuccess() {
240 OnSigninStatusChanged(); 244 OnSigninStatusChanged();
241 } 245 }
242 246
243 SigninDelegate* AppListView::GetSigninDelegate() { 247 SigninDelegate* AppListView::GetSigninDelegate() {
244 return delegate_ ? delegate_->GetSigninDelegate() : NULL; 248 return delegate_ ? delegate_->GetSigninDelegate() : NULL;
245 } 249 }
246 250
247 } // namespace app_list 251 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698