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

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

Issue 657653002: Move app list search box into AppListView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/apps_grid_view.cc ('k') | ui/app_list/views/contents_view.h » ('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 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/contents_switcher_view.h" 5 #include "ui/app_list/views/contents_switcher_view.h"
6 6
7 #include "ui/app_list/views/contents_view.h" 7 #include "ui/app_list/views/contents_view.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/views/controls/button/custom_button.h" 9 #include "ui/views/controls/button/custom_button.h"
10 #include "ui/views/controls/button/image_button.h" 10 #include "ui/views/controls/button/image_button.h"
11 #include "ui/views/layout/box_layout.h" 11 #include "ui/views/layout/box_layout.h"
12 12
13 namespace app_list { 13 namespace app_list {
14 14
15 namespace { 15 namespace {
16 16
17 const int kButtonSpacing = 4; 17 const int kButtonSpacing = 4;
18 const int kMinimumHeight = 39; 18 const int kMinimumHeight = 40;
19 19
20 } // namespace 20 } // namespace
21 21
22 ContentsSwitcherView::ContentsSwitcherView(ContentsView* contents_view) 22 ContentsSwitcherView::ContentsSwitcherView(ContentsView* contents_view)
23 : contents_view_(contents_view) { 23 : contents_view_(contents_view) {
24 views::BoxLayout* layout = new views::BoxLayout( 24 views::BoxLayout* layout = new views::BoxLayout(
25 views::BoxLayout::kHorizontal, 0, 0, kButtonSpacing); 25 views::BoxLayout::kHorizontal, 0, 0, kButtonSpacing);
26 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); 26 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
27 layout->set_minimum_cross_axis_size(kMinimumHeight); 27 layout->set_minimum_cross_axis_size(kMinimumHeight);
28 SetLayoutManager(layout); 28 SetLayoutManager(layout);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (pm.IsRevertingCurrentTransition()) { 67 if (pm.IsRevertingCurrentTransition()) {
68 // Swap the direction if the transition is reversed. 68 // Swap the direction if the transition is reversed.
69 old_selected = pm.transition().target_page; 69 old_selected = pm.transition().target_page;
70 new_selected = pm.selected_page(); 70 new_selected = pm.selected_page();
71 } 71 }
72 72
73 SelectedPageChanged(old_selected, new_selected); 73 SelectedPageChanged(old_selected, new_selected);
74 } 74 }
75 75
76 } // namespace app_list 76 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698