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

Side by Side Diff: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc

Issue 2055553004: arc: Support pinned apps across Arc-enabled and Arc-disabled platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrome_mash_shelf_controller.cc update due namespace renaming Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 } 138 }
139 139
140 base::string16 AppWindowLauncherItemController::GetTitle() { 140 base::string16 AppWindowLauncherItemController::GetTitle() {
141 return LauncherControllerHelper::GetAppTitle( 141 return LauncherControllerHelper::GetAppTitle(
142 launcher_controller()->GetProfile(), app_id()); 142 launcher_controller()->GetProfile(), app_id());
143 } 143 }
144 144
145 bool AppWindowLauncherItemController::IsDraggable() { 145 bool AppWindowLauncherItemController::IsDraggable() {
146 DCHECK_EQ(TYPE_APP, type()); 146 DCHECK_EQ(TYPE_APP, type());
147 return CanPin(); 147 return true;
148 } 148 }
149 149
150 bool AppWindowLauncherItemController::CanPin() const { 150 bool AppWindowLauncherItemController::CanPin() const {
151 return launcher_controller()->GetPinnable(app_id()) == 151 return launcher_controller()->GetPinnable(app_id()) ==
152 AppListControllerDelegate::PIN_EDITABLE; 152 AppListControllerDelegate::PIN_EDITABLE;
153 } 153 }
154 154
155 bool AppWindowLauncherItemController::ShouldShowTooltip() { 155 bool AppWindowLauncherItemController::ShouldShowTooltip() {
156 DCHECK_EQ(TYPE_APP, type()); 156 DCHECK_EQ(TYPE_APP, type());
157 return true; 157 return true;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (window_to_show->IsActive()) { 196 if (window_to_show->IsActive()) {
197 // Coming here, only a single window is active. For keyboard activations 197 // Coming here, only a single window is active. For keyboard activations
198 // the window gets animated. 198 // the window gets animated.
199 AnimateWindow(window_to_show->GetNativeWindow(), 199 AnimateWindow(window_to_show->GetNativeWindow(),
200 wm::WINDOW_ANIMATION_TYPE_BOUNCE); 200 wm::WINDOW_ANIMATION_TYPE_BOUNCE);
201 } else { 201 } else {
202 return ShowAndActivateOrMinimize(window_to_show); 202 return ShowAndActivateOrMinimize(window_to_show);
203 } 203 }
204 return kNoAction; 204 return kNoAction;
205 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698