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

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

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Created 3 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
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 "ui/app_list/views/all_apps_tile_item_view.h" 5 #include "ui/app_list/views/all_apps_tile_item_view.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.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_features.h"
10 #include "ui/app_list/views/app_list_view.h"
9 #include "ui/app_list/views/contents_view.h" 11 #include "ui/app_list/views/contents_view.h"
10 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/canvas.h" 14 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/image/canvas_image_source.h" 15 #include "ui/gfx/image/canvas_image_source.h"
14 #include "ui/resources/grit/ui_resources.h" 16 #include "ui/resources/grit/ui_resources.h"
15 #include "ui/strings/grit/ui_strings.h" 17 #include "ui/strings/grit/ui_strings.h"
18 #include "ui/views/widget/widget.h"
16 19
17 namespace app_list { 20 namespace app_list {
18 21
19 namespace { 22 namespace {
20 23
21 class AllAppsImageSource : public gfx::CanvasImageSource { 24 class AllAppsImageSource : public gfx::CanvasImageSource {
22 public: 25 public:
23 AllAppsImageSource(const gfx::ImageSkia& icon, const gfx::Size& size) 26 AllAppsImageSource(const gfx::ImageSkia& icon, const gfx::Size& size)
24 : gfx::CanvasImageSource(size, false), icon_(icon) {} 27 : gfx::CanvasImageSource(size, false), icon_(icon) {}
25 ~AllAppsImageSource() override {} 28 ~AllAppsImageSource() override {}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 60
58 SetIcon(image); 61 SetIcon(image);
59 } 62 }
60 63
61 void AllAppsTileItemView::ButtonPressed(views::Button* sender, 64 void AllAppsTileItemView::ButtonPressed(views::Button* sender,
62 const ui::Event& event) { 65 const ui::Event& event) {
63 UMA_HISTOGRAM_ENUMERATION(kPageOpenedHistogram, AppListModel::STATE_APPS, 66 UMA_HISTOGRAM_ENUMERATION(kPageOpenedHistogram, AppListModel::STATE_APPS,
64 AppListModel::STATE_LAST); 67 AppListModel::STATE_LAST);
65 68
66 contents_view_->SetActiveState(AppListModel::STATE_APPS); 69 contents_view_->SetActiveState(AppListModel::STATE_APPS);
70 if(features::IsFullscreenAppListEnabled()){
vadimt 2017/05/22 23:36:57 Space before {? Git cl format?
newcomer 2017/05/25 23:10:51 Done.
71 AppListView *app_list_view =
72 (AppListView*)GetAncestorWithClassName("AppListView");
vadimt 2017/05/22 23:36:57 Please try properly plumbing AppListView as oppose
newcomer 2017/05/25 23:10:51 Done.
73 app_list_view->ToFullscreen();
74 }
67 } 75 }
68 76
69 } // namespace app_list 77 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698