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

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

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/app_list/app_list_export.h" 9 #include "ui/app_list/app_list_export.h"
10 #include "ui/app_list/signin_delegate_observer.h" 10 #include "ui/app_list/signin_delegate_observer.h"
11 #include "ui/views/bubble/bubble_delegate.h" 11 #include "ui/views/bubble/bubble_delegate.h"
12 12
13 namespace views { 13 namespace views {
14 class Widget; 14 class Widget;
15 } 15 }
16 16
17 namespace app_list { 17 namespace app_list {
18 18 class ApplicationDnDHost;
19 class AppListMainView; 19 class AppListMainView;
20 class AppListModel; 20 class AppListModel;
21 class AppListViewDelegate; 21 class AppListViewDelegate;
22 class PaginationModel; 22 class PaginationModel;
23 class SigninDelegate; 23 class SigninDelegate;
24 class SigninView; 24 class SigninView;
25 25
26 // AppListView is the top-level view and controller of app list UI. It creates 26 // AppListView is the top-level view and controller of app list UI. It creates
27 // and hosts a AppsGridView and passes AppListModel to it for display. 27 // and hosts a AppsGridView and passes AppListModel to it for display.
28 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, 28 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView,
29 public SigninDelegateObserver { 29 public SigninDelegateObserver {
30 public: 30 public:
31 // Takes ownership of |delegate|. 31 // Takes ownership of |delegate|.
32 explicit AppListView(AppListViewDelegate* delegate); 32 explicit AppListView(AppListViewDelegate* delegate);
33 virtual ~AppListView(); 33 virtual ~AppListView();
34 34
35 // Initializes the widget. 35 // Initializes the widget.
36 void InitAsBubble(gfx::NativeView parent, 36 void InitAsBubble(gfx::NativeView parent,
37 PaginationModel* pagination_model, 37 PaginationModel* pagination_model,
38 views::View* anchor, 38 views::View* anchor,
39 const gfx::Point& anchor_point, 39 const gfx::Point& anchor_point,
40 views::BubbleBorder::Arrow arrow, 40 views::BubbleBorder::Arrow arrow,
41 bool border_accepts_events); 41 bool border_accepts_events);
42 42
43 void SetBubbleArrow(views::BubbleBorder::Arrow arrow); 43 void SetBubbleArrow(views::BubbleBorder::Arrow arrow);
44 44
45 void SetAnchorPoint(const gfx::Point& anchor_point); 45 void SetAnchorPoint(const gfx::Point& anchor_point);
46 46
47 // If |dnd_host| is not NULL it will be called upon drag and drop operations
48 // outside the application list. This call has to be called after
49 // InitAsBubble.
James Cook 2013/04/29 22:08:29 Comment why it must be called afterwards.
Mr4D (OOO till 08-26) 2013/04/30 16:59:01 Done.
50 void SetAppListDnDHost(app_list::ApplicationDnDHost* dnd_host);
51
47 // Shows the UI when there are no pending icon loads. Otherwise, starts a 52 // Shows the UI when there are no pending icon loads. Otherwise, starts a
48 // timer to show the UI when a maximum allowed wait time has expired. 53 // timer to show the UI when a maximum allowed wait time has expired.
49 void ShowWhenReady(); 54 void ShowWhenReady();
50 55
51 void Close(); 56 void Close();
52 57
53 void UpdateBounds(); 58 void UpdateBounds();
54 59
55 // Overridden from views::View: 60 // Overridden from views::View:
56 virtual gfx::Size GetPreferredSize() OVERRIDE; 61 virtual gfx::Size GetPreferredSize() OVERRIDE;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 96
92 AppListMainView* app_list_main_view_; 97 AppListMainView* app_list_main_view_;
93 SigninView* signin_view_; 98 SigninView* signin_view_;
94 99
95 DISALLOW_COPY_AND_ASSIGN(AppListView); 100 DISALLOW_COPY_AND_ASSIGN(AppListView);
96 }; 101 };
97 102
98 } // namespace app_list 103 } // namespace app_list
99 104
100 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 105 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698