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

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

Issue 2339523004: Remove old (dead) app list code. (Closed)
Patch Set: Address nonbistytftatl review. Created 4 years, 2 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // AppListView is the top-level view and controller of app list UI. It creates 43 // AppListView is the top-level view and controller of app list UI. It creates
44 // and hosts a AppsGridView and passes AppListModel to it for display. 44 // and hosts a AppsGridView and passes AppListModel to it for display.
45 class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, 45 class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView,
46 public AppListViewDelegateObserver, 46 public AppListViewDelegateObserver,
47 public SpeechUIModelObserver { 47 public SpeechUIModelObserver {
48 public: 48 public:
49 // Does not take ownership of |delegate|. 49 // Does not take ownership of |delegate|.
50 explicit AppListView(AppListViewDelegate* delegate); 50 explicit AppListView(AppListViewDelegate* delegate);
51 ~AppListView() override; 51 ~AppListView() override;
52 52
53 // Initializes the widget and use a given |anchor| plus an |anchor_offset| for
54 // positioning.
55 void InitAsBubbleAttachedToAnchor(gfx::NativeView parent,
56 int initial_apps_page,
57 views::View* anchor,
58 const gfx::Vector2d& anchor_offset,
59 views::BubbleBorder::Arrow arrow,
60 bool border_accepts_events);
61
62 // Initializes the widget and use a fixed |anchor_point_in_screen| for 53 // Initializes the widget and use a fixed |anchor_point_in_screen| for
63 // positioning. 54 // positioning.
64 void InitAsBubbleAtFixedLocation(gfx::NativeView parent, 55 void InitAsBubbleAtFixedLocation(gfx::NativeView parent,
65 int initial_apps_page, 56 int initial_apps_page,
66 const gfx::Point& anchor_point_in_screen, 57 const gfx::Point& anchor_point_in_screen,
67 views::BubbleBorder::Arrow arrow, 58 views::BubbleBorder::Arrow arrow,
68 bool border_accepts_events); 59 bool border_accepts_events);
69 60
70 // Initializes the widget as a frameless window, not a bubble. 61 // Initializes the widget as a frameless window, not a bubble.
71 void InitAsFramelessWindow(gfx::NativeView parent, 62 void InitAsFramelessWindow(gfx::NativeView parent,
(...skipping 16 matching lines...) Expand all
88 void ShowWhenReady(); 79 void ShowWhenReady();
89 80
90 void CloseAppList(); 81 void CloseAppList();
91 82
92 void UpdateBounds(); 83 void UpdateBounds();
93 84
94 // Enables/disables a semi-transparent overlay over the app list (good for 85 // Enables/disables a semi-transparent overlay over the app list (good for
95 // hiding the app list when a modal dialog is being shown). 86 // hiding the app list when a modal dialog is being shown).
96 void SetAppListOverlayVisible(bool visible); 87 void SetAppListOverlayVisible(bool visible);
97 88
98 // Returns true if the app list should be centered and in landscape mode.
99 bool ShouldCenterWindow() const;
100
101 views::Widget* search_box_widget() const { return search_box_widget_; } 89 views::Widget* search_box_widget() const { return search_box_widget_; }
102 90
103 // Overridden from views::View: 91 // Overridden from views::View:
104 gfx::Size GetPreferredSize() const override; 92 gfx::Size GetPreferredSize() const override;
105 void OnPaint(gfx::Canvas* canvas) override; 93 void OnPaint(gfx::Canvas* canvas) override;
106 94
107 // WidgetDelegate overrides: 95 // WidgetDelegate overrides:
108 bool ShouldHandleSystemCommands() const override; 96 bool ShouldHandleSystemCommands() const override;
109 bool ShouldDescendIntoChildForEventHandling( 97 bool ShouldDescendIntoChildForEventHandling(
110 gfx::NativeView child, 98 gfx::NativeView child,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 167
180 // For UMA and testing. If non-null, triggered when the app list is painted. 168 // For UMA and testing. If non-null, triggered when the app list is painted.
181 base::Closure next_paint_callback_; 169 base::Closure next_paint_callback_;
182 170
183 DISALLOW_COPY_AND_ASSIGN(AppListView); 171 DISALLOW_COPY_AND_ASSIGN(AppListView);
184 }; 172 };
185 173
186 } // namespace app_list 174 } // namespace app_list
187 175
188 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 176 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698