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

Side by Side Diff: ui/app_list/views/contents_view.h

Issue 331413003: Slight refactor of search result handling in ContentsView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/app_list/views/contents_view.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 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 StartPageView* start_page_view() { return start_page_view_; } 81 StartPageView* start_page_view() { return start_page_view_; }
82 SearchResultListView* search_results_view() { return search_results_view_; } 82 SearchResultListView* search_results_view() { return search_results_view_; }
83 83
84 // Overridden from views::View: 84 // Overridden from views::View:
85 virtual gfx::Size GetPreferredSize() const OVERRIDE; 85 virtual gfx::Size GetPreferredSize() const OVERRIDE;
86 virtual void Layout() OVERRIDE; 86 virtual void Layout() OVERRIDE;
87 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 87 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
88 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; 88 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
89 89
90 private: 90 private:
91 // Sets the active launcher page, accounting for whether the change is for
92 // search results.
93 void SetActivePageInternal(int page_index, bool show_search_results);
94
91 // Invoked when active view is changed. 95 // Invoked when active view is changed.
92 void ActivePageChanged(); 96 void ActivePageChanged(bool show_search_results);
93 97
94 void CalculateIdealBounds(); 98 void CalculateIdealBounds();
95 void AnimateToIdealBounds(); 99 void AnimateToIdealBounds();
96 100
97 // Adds |view| as a new page to the end of the list of launcher pages. The 101 // Adds |view| as a new page to the end of the list of launcher pages. The
98 // view is inserted as a child of the ContentsView. There is no name 102 // view is inserted as a child of the ContentsView. There is no name
99 // associated with the page. Returns the index of the new page. 103 // associated with the page. Returns the index of the new page.
100 int AddLauncherPage(views::View* view); 104 int AddLauncherPage(views::View* view);
101 105
102 // Adds |view| as a new page to the end of the list of launcher pages. The 106 // Adds |view| as a new page to the end of the list of launcher pages. The
(...skipping 22 matching lines...) Expand all
125 // Maps NamedPage onto |view_model_| indices. 129 // Maps NamedPage onto |view_model_| indices.
126 std::map<NamedPage, int> named_page_to_view_; 130 std::map<NamedPage, int> named_page_to_view_;
127 scoped_ptr<views::BoundsAnimator> bounds_animator_; 131 scoped_ptr<views::BoundsAnimator> bounds_animator_;
128 132
129 DISALLOW_COPY_AND_ASSIGN(ContentsView); 133 DISALLOW_COPY_AND_ASSIGN(ContentsView);
130 }; 134 };
131 135
132 } // namespace app_list 136 } // namespace app_list
133 137
134 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 138 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698