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

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

Issue 2713603002: Remove fullscreen applist (Closed)
Patch Set: . Created 3 years, 9 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
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 overlay_view_->SetBoundsRect(GetContentsBounds()); 222 overlay_view_->SetBoundsRect(GetContentsBounds());
223 AddChildView(overlay_view_); 223 AddChildView(overlay_view_);
224 224
225 if (delegate_) 225 if (delegate_)
226 delegate_->ViewInitialized(); 226 delegate_->ViewInitialized();
227 227
228 UMA_HISTOGRAM_TIMES("Apps.AppListCreationTime", 228 UMA_HISTOGRAM_TIMES("Apps.AppListCreationTime",
229 base::Time::Now() - start_time); 229 base::Time::Now() - start_time);
230 } 230 }
231 231
232 void AppListView::InitAsFramelessWindow(gfx::NativeView parent,
233 int initial_apps_page,
234 gfx::Rect bounds) {
235 set_color(kContentsBackgroundColor);
236 InitContents(parent, initial_apps_page);
237 overlay_view_ = new AppListOverlayView(0 /* no corners */);
238 AddChildView(overlay_view_);
239
240 views::Widget* widget = new views::Widget();
241 views::Widget::InitParams params(
242 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
243 params.parent = parent;
244 params.delegate = this;
245 widget->Init(params);
246 widget->SetBounds(bounds);
247
248 InitChildWidgets();
249 }
250
251 void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) { 232 void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) {
252 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); 233 GetBubbleFrameView()->bubble_border()->set_arrow(arrow);
253 SizeToContents(); // Recalcuates with new border. 234 SizeToContents(); // Recalcuates with new border.
254 GetBubbleFrameView()->SchedulePaint(); 235 GetBubbleFrameView()->SchedulePaint();
255 } 236 }
256 237
257 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { 238 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) {
258 SetAnchorRect(gfx::Rect(anchor_point, gfx::Size())); 239 SetAnchorRect(gfx::Rect(anchor_point, gfx::Size()));
259 } 240 }
260 241
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 app_list_main_view_->SetVisible(true); 576 app_list_main_view_->SetVisible(true);
596 // Refocus the search box. However, if the app list widget does not have 577 // Refocus the search box. However, if the app list widget does not have
597 // focus, it means another window has already taken focus, and we *must not* 578 // focus, it means another window has already taken focus, and we *must not*
598 // focus the search box (or we would steal focus back into the app list). 579 // focus the search box (or we would steal focus back into the app list).
599 if (GetWidget()->IsActive()) 580 if (GetWidget()->IsActive())
600 search_box_view_->search_box()->RequestFocus(); 581 search_box_view_->search_box()->RequestFocus();
601 } 582 }
602 } 583 }
603 584
604 } // namespace app_list 585 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698