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

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

Issue 2787693002: Remove more dead app list code. (Closed)
Patch Set: updated comment Created 3 years, 8 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') | ui/app_list/views/app_list_view_unittest.cc » ('j') | 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 29 matching lines...) Expand all
40 #include "ui/views/bubble/bubble_frame_view.h" 40 #include "ui/views/bubble/bubble_frame_view.h"
41 #include "ui/views/bubble/bubble_window_targeter.h" 41 #include "ui/views/bubble/bubble_window_targeter.h"
42 #include "ui/views/controls/image_view.h" 42 #include "ui/views/controls/image_view.h"
43 #include "ui/views/controls/textfield/textfield.h" 43 #include "ui/views/controls/textfield/textfield.h"
44 #include "ui/views/layout/fill_layout.h" 44 #include "ui/views/layout/fill_layout.h"
45 #include "ui/views/views_delegate.h" 45 #include "ui/views/views_delegate.h"
46 #include "ui/views/widget/widget.h" 46 #include "ui/views/widget/widget.h"
47 #include "ui/wm/core/masked_window_targeter.h" 47 #include "ui/wm/core/masked_window_targeter.h"
48 #include "ui/wm/core/shadow_types.h" 48 #include "ui/wm/core/shadow_types.h"
49 49
50 #if defined(OS_WIN)
51 #include "base/win/windows_version.h"
52 #endif
53
54 namespace app_list { 50 namespace app_list {
55 51
56 namespace { 52 namespace {
57 53
58 // The margin from the edge to the speech UI. 54 // The margin from the edge to the speech UI.
59 const int kSpeechUIMargin = 12; 55 const int kSpeechUIMargin = 12;
60 56
61 // The vertical position for the appearing animation of the speech UI. 57 // The vertical position for the appearing animation of the speech UI.
62 const float kSpeechUIAppearingPosition = 12; 58 const float kSpeechUIAppearingPosition = 12;
63 59
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (contents_view->custom_page_view() && 317 if (contents_view->custom_page_view() &&
322 contents_view->GetActiveState() == AppListModel::STATE_START) 318 contents_view->GetActiveState() == AppListModel::STATE_START)
323 return !contents_view->custom_page_view() 319 return !contents_view->custom_page_view()
324 ->GetCollapsedLauncherPageBounds() 320 ->GetCollapsedLauncherPageBounds()
325 .Contains(location); 321 .Contains(location);
326 322
327 return views::BubbleDialogDelegateView:: 323 return views::BubbleDialogDelegateView::
328 ShouldDescendIntoChildForEventHandling(child, location); 324 ShouldDescendIntoChildForEventHandling(child, location);
329 } 325 }
330 326
331 void AppListView::SetProfileByPath(const base::FilePath& profile_path) {
332 delegate_->SetProfileByPath(profile_path);
333 app_list_main_view_->ModelChanged();
334 }
335
336 PaginationModel* AppListView::GetAppsPaginationModel() { 327 PaginationModel* AppListView::GetAppsPaginationModel() {
337 return app_list_main_view_->contents_view() 328 return app_list_main_view_->contents_view()
338 ->apps_container_view() 329 ->apps_container_view()
339 ->apps_grid_view() 330 ->apps_grid_view()
340 ->pagination_model(); 331 ->pagination_model();
341 } 332 }
342 333
343 void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) { 334 void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) {
344 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440224 and 335 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440224 and
345 // crbug.com/441028 are fixed. 336 // crbug.com/441028 are fixed.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 app_list_main_view_->SetVisible(true); 567 app_list_main_view_->SetVisible(true);
577 // Refocus the search box. However, if the app list widget does not have 568 // Refocus the search box. However, if the app list widget does not have
578 // focus, it means another window has already taken focus, and we *must not* 569 // focus, it means another window has already taken focus, and we *must not*
579 // focus the search box (or we would steal focus back into the app list). 570 // focus the search box (or we would steal focus back into the app list).
580 if (GetWidget()->IsActive()) 571 if (GetWidget()->IsActive())
581 search_box_view_->search_box()->RequestFocus(); 572 search_box_view_->search_box()->RequestFocus();
582 } 573 }
583 } 574 }
584 575
585 } // namespace app_list 576 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698