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

Side by Side Diff: ash/common/shelf/app_list_button.cc

Issue 2339523004: Remove old (dead) app list code. (Closed)
Patch Set: Address nonbistytftatl review. Created 4 years, 3 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 "ash/common/shelf/app_list_button.h" 5 #include "ash/common/shelf/app_list_button.h"
6 6
7 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/shelf/ink_drop_button_listener.h" 9 #include "ash/common/shelf/ink_drop_button_listener.h"
10 #include "ash/common/shelf/shelf_constants.h" 10 #include "ash/common/shelf/shelf_constants.h"
(...skipping 29 matching lines...) Expand all
40 wm_shelf_(wm_shelf) { 40 wm_shelf_(wm_shelf) {
41 DCHECK(listener_); 41 DCHECK(listener_);
42 DCHECK(shelf_view_); 42 DCHECK(shelf_view_);
43 DCHECK(wm_shelf_); 43 DCHECK(wm_shelf_);
44 if (ash::MaterialDesignController::IsShelfMaterial()) { 44 if (ash::MaterialDesignController::IsShelfMaterial()) {
45 SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); 45 SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER);
46 set_ink_drop_base_color(kShelfInkDropBaseColor); 46 set_ink_drop_base_color(kShelfInkDropBaseColor);
47 set_ink_drop_visible_opacity(kShelfInkDropVisibleOpacity); 47 set_ink_drop_visible_opacity(kShelfInkDropVisibleOpacity);
48 } 48 }
49 SetAccessibleName( 49 SetAccessibleName(
50 app_list::switches::IsExperimentalAppListEnabled() 50 l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE));
51 ? l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE)
52 : l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_TITLE));
53 SetSize( 51 SetSize(
54 gfx::Size(GetShelfConstant(SHELF_SIZE), GetShelfConstant(SHELF_SIZE))); 52 gfx::Size(GetShelfConstant(SHELF_SIZE), GetShelfConstant(SHELF_SIZE)));
55 SetFocusPainter(views::Painter::CreateSolidFocusPainter( 53 SetFocusPainter(views::Painter::CreateSolidFocusPainter(
56 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); 54 kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
57 set_notify_action(CustomButton::NOTIFY_ON_PRESS); 55 set_notify_action(CustomButton::NOTIFY_ON_PRESS);
58 } 56 }
59 57
60 AppListButton::~AppListButton() {} 58 AppListButton::~AppListButton() {}
61 59
62 void AppListButton::OnAppListShown() { 60 void AppListButton::OnAppListShown() {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 280 }
283 281
284 void AppListButton::SetDrawBackgroundAsActive(bool draw_background_as_active) { 282 void AppListButton::SetDrawBackgroundAsActive(bool draw_background_as_active) {
285 if (draw_background_as_active_ == draw_background_as_active) 283 if (draw_background_as_active_ == draw_background_as_active)
286 return; 284 return;
287 draw_background_as_active_ = draw_background_as_active; 285 draw_background_as_active_ = draw_background_as_active;
288 SchedulePaint(); 286 SchedulePaint();
289 } 287 }
290 288
291 } // namespace ash 289 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698