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

Side by Side Diff: ash/wm/app_list_controller.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 "ash/wm/app_list_controller.h" 5 #include "ash/wm/app_list_controller.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 bool AppListController::IsVisible() const { 134 bool AppListController::IsVisible() const {
135 return view_ && view_->GetWidget()->IsVisible(); 135 return view_ && view_->GetWidget()->IsVisible();
136 } 136 }
137 137
138 aura::Window* AppListController::GetWindow() { 138 aura::Window* AppListController::GetWindow() {
139 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; 139 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL;
140 } 140 }
141 141
142 void AppListController::SetDragAndDropHostOfCurrentAppList(
143 app_list::ApplicationDragAndDropHost* drag_and_drop_host) {
144 if (view_ && is_visible_)
145 view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
146 }
147
142 //////////////////////////////////////////////////////////////////////////////// 148 ////////////////////////////////////////////////////////////////////////////////
143 // AppListController, private: 149 // AppListController, private:
144 150
145 void AppListController::SetView(app_list::AppListView* view) { 151 void AppListController::SetView(app_list::AppListView* view) {
146 DCHECK(view_ == NULL); 152 DCHECK(view_ == NULL);
147 DCHECK(is_visible_); 153 DCHECK(is_visible_);
148 154
149 view_ = view; 155 view_ = view;
150 views::Widget* widget = view_->GetWidget(); 156 views::Widget* widget = view_->GetWidget();
151 widget->AddObserver(this); 157 widget->AddObserver(this);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 should_snap_back_ = false; 346 should_snap_back_ = false;
341 ui::ScopedLayerAnimationSettings animation(widget_animator); 347 ui::ScopedLayerAnimationSettings animation(widget_animator);
342 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 348 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
343 app_list::kOverscrollPageTransitionDurationMs)); 349 app_list::kOverscrollPageTransitionDurationMs));
344 widget->SetBounds(view_bounds_); 350 widget->SetBounds(view_bounds_);
345 } 351 }
346 } 352 }
347 353
348 } // namespace internal 354 } // namespace internal
349 } // namespace ash 355 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698