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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/app_list/views/search_result_list_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_SEARCH_RESULT_LIST_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_LIST_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_LIST_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_LIST_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void SearchResultActionActivated(SearchResultView* view, 48 void SearchResultActionActivated(SearchResultView* view,
49 size_t action_index, 49 size_t action_index,
50 int event_flags); 50 int event_flags);
51 51
52 void OnSearchResultInstalled(SearchResultView* view); 52 void OnSearchResultInstalled(SearchResultView* view);
53 53
54 void OnSearchResultUninstalled(SearchResultView* view); 54 void OnSearchResultUninstalled(SearchResultView* view);
55 55
56 // Overridden from views::View: 56 // Overridden from views::View:
57 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 57 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
58 virtual gfx::Size GetPreferredSize() OVERRIDE; 58 virtual gfx::Size GetPreferredSize() const OVERRIDE;
59 59
60 private: 60 private:
61 friend class test::SearchResultListViewTest; 61 friend class test::SearchResultListViewTest;
62 62
63 // Updates the auto launch states. 63 // Updates the auto launch states.
64 void SetAutoLaunchTimeout(const base::TimeDelta& timeout); 64 void SetAutoLaunchTimeout(const base::TimeDelta& timeout);
65 void CancelAutoLaunchTimeout(); 65 void CancelAutoLaunchTimeout();
66 66
67 // Helper function to get SearchResultView at given |index|. 67 // Helper function to get SearchResultView at given |index|.
68 SearchResultView* GetResultViewAt(int index); 68 SearchResultView* GetResultViewAt(int index);
69 69
70 // Updates UI with model. 70 // Updates UI with model.
71 void Update(); 71 void Update();
72 72
73 // Schedules an Update call using |update_factory_|. Do nothing if there is a 73 // Schedules an Update call using |update_factory_|. Do nothing if there is a
74 // pending call. 74 // pending call.
75 void ScheduleUpdate(); 75 void ScheduleUpdate();
76 76
77 // Forcibly auto-launch for test if it is in auto-launching state. 77 // Forcibly auto-launch for test if it is in auto-launching state.
78 void ForceAutoLaunchForTest(); 78 void ForceAutoLaunchForTest();
79 79
80 // Overridden from views::View: 80 // Overridden from views::View:
81 virtual void Layout() OVERRIDE; 81 virtual void Layout() OVERRIDE;
82 virtual int GetHeightForWidth(int w) OVERRIDE; 82 virtual int GetHeightForWidth(int w) const OVERRIDE;
83 virtual void VisibilityChanged( 83 virtual void VisibilityChanged(
84 views::View* starting_from, bool is_visible) OVERRIDE; 84 views::View* starting_from, bool is_visible) OVERRIDE;
85 85
86 // Overridden from gfx::AnimationDelegate: 86 // Overridden from gfx::AnimationDelegate:
87 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; 87 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
88 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; 88 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
89 89
90 // Overridden from ui::ListModelObserver: 90 // Overridden from ui::ListModelObserver:
91 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; 91 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE;
92 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; 92 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE;
(...skipping 13 matching lines...) Expand all
106 106
107 // The factory that consolidates multiple Update calls into one. 107 // The factory that consolidates multiple Update calls into one.
108 base::WeakPtrFactory<SearchResultListView> update_factory_; 108 base::WeakPtrFactory<SearchResultListView> update_factory_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(SearchResultListView); 110 DISALLOW_COPY_AND_ASSIGN(SearchResultListView);
111 }; 111 };
112 112
113 } // namespace app_list 113 } // namespace app_list
114 114
115 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_LIST_VIEW_H_ 115 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/app_list/views/search_result_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698