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

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

Issue 2952763002: SearchBoxView now enables/disables cursor based on user interaction. (Closed)
Patch Set: rebased. Created 3 years, 5 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 | « testing/buildbot/filters/ash_unittests_mash.filter ('k') | ui/app_list/views/app_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_APP_LIST_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void ShowWhenReady(); 89 void ShowWhenReady();
90 90
91 void UpdateBounds(); 91 void UpdateBounds();
92 92
93 // Enables/disables a semi-transparent overlay over the app list (good for 93 // Enables/disables a semi-transparent overlay over the app list (good for
94 // hiding the app list when a modal dialog is being shown). 94 // hiding the app list when a modal dialog is being shown).
95 void SetAppListOverlayVisible(bool visible); 95 void SetAppListOverlayVisible(bool visible);
96 96
97 views::Widget* search_box_widget() const { return search_box_widget_; } 97 views::Widget* search_box_widget() const { return search_box_widget_; }
98 98
99 SearchBoxView* search_box_view() { return search_box_view_; }
100
99 // Overridden from views::View: 101 // Overridden from views::View:
100 gfx::Size CalculatePreferredSize() const override; 102 gfx::Size CalculatePreferredSize() const override;
101 void OnPaint(gfx::Canvas* canvas) override; 103 void OnPaint(gfx::Canvas* canvas) override;
102 const char* GetClassName() const override; 104 const char* GetClassName() const override;
103 105
104 // WidgetDelegate overrides: 106 // WidgetDelegate overrides:
105 bool ShouldHandleSystemCommands() const override; 107 bool ShouldHandleSystemCommands() const override;
106 bool ShouldDescendIntoChildForEventHandling( 108 bool ShouldDescendIntoChildForEventHandling(
107 gfx::NativeView child, 109 gfx::NativeView child,
108 const gfx::Point& location) override; 110 const gfx::Point& location) override;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void InitContents(gfx::NativeView parent, int initial_apps_page); 142 void InitContents(gfx::NativeView parent, int initial_apps_page);
141 143
142 void InitChildWidgets(); 144 void InitChildWidgets();
143 145
144 // Initializes the widget for fullscreen mode. 146 // Initializes the widget for fullscreen mode.
145 void InitializeFullscreen(gfx::NativeView parent, int initial_apps_page); 147 void InitializeFullscreen(gfx::NativeView parent, int initial_apps_page);
146 148
147 // Initializes the widget as a bubble. 149 // Initializes the widget as a bubble.
148 void InitializeBubble(gfx::NativeView parent, int initial_apps_page); 150 void InitializeBubble(gfx::NativeView parent, int initial_apps_page);
149 151
152 // Closes the AppListView when a click or tap event propogates to the
153 // AppListView.
154 void HandleClickOrTap();
155
150 // Initializes |initial_drag_point_|. 156 // Initializes |initial_drag_point_|.
151 void StartDrag(const gfx::Point& location); 157 void StartDrag(const gfx::Point& location);
152 158
153 // Updates the bounds of the widget while maintaining the relative position 159 // Updates the bounds of the widget while maintaining the relative position
154 // of the top of the widget and the gesture. 160 // of the top of the widget and the gesture.
155 void UpdateDrag(const gfx::Point& location); 161 void UpdateDrag(const gfx::Point& location);
156 162
157 // Handles app list state transfers. If the drag was fast enough, ignore the 163 // Handles app list state transfers. If the drag was fast enough, ignore the
158 // release position and snap to the next state. 164 // release position and snap to the next state.
159 void EndDrag(const gfx::Point& location); 165 void EndDrag(const gfx::Point& location);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool is_maximize_mode_ = false; 206 bool is_maximize_mode_ = false;
201 // Whether the shelf is oriented on the side. 207 // Whether the shelf is oriented on the side.
202 bool is_side_shelf_ = false; 208 bool is_side_shelf_ = false;
203 209
204 // The gap between the initial gesture event and the top of the window. 210 // The gap between the initial gesture event and the top of the window.
205 gfx::Point initial_drag_point_; 211 gfx::Point initial_drag_point_;
206 // The velocity of the gesture event. 212 // The velocity of the gesture event.
207 float last_fling_velocity_ = 0; 213 float last_fling_velocity_ = 0;
208 // Whether the fullscreen app list feature is enabled. 214 // Whether the fullscreen app list feature is enabled.
209 const bool is_fullscreen_app_list_enabled_; 215 const bool is_fullscreen_app_list_enabled_;
216 // Whether a series of scroll events are being processed.
217 bool processing_scroll_event_series_;
210 // The state of the app list, controlled via SetState(). 218 // The state of the app list, controlled via SetState().
211 AppListState app_list_state_; 219 AppListState app_list_state_;
212 220
213 // An observer that notifies AppListView when the display has changed. 221 // An observer that notifies AppListView when the display has changed.
214 ScopedObserver<display::Screen, display::DisplayObserver> display_observer_; 222 ScopedObserver<display::Screen, display::DisplayObserver> display_observer_;
215 223
216 // A semi-transparent white overlay that covers the app list while dialogs are 224 // A semi-transparent white overlay that covers the app list while dialogs
217 // open. 225 // are open.
218 views::View* overlay_view_; 226 views::View* overlay_view_;
219 227
220 std::unique_ptr<HideViewAnimationObserver> animation_observer_; 228 std::unique_ptr<HideViewAnimationObserver> animation_observer_;
221 229
222 // For UMA and testing. If non-null, triggered when the app list is painted. 230 // For UMA and testing. If non-null, triggered when the app list is painted.
223 base::Closure next_paint_callback_; 231 base::Closure next_paint_callback_;
224 232
225 DISALLOW_COPY_AND_ASSIGN(AppListView); 233 DISALLOW_COPY_AND_ASSIGN(AppListView);
226 }; 234 };
227 235
228 } // namespace app_list 236 } // namespace app_list
229 237
230 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 238 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « testing/buildbot/filters/ash_unittests_mash.filter ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698