OLD | NEW |
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 #include "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 RemoveAllChildViews(true); | 64 RemoveAllChildViews(true); |
65 } | 65 } |
66 | 66 |
67 void AppListView::InitAsBubbleAttachedToAnchor( | 67 void AppListView::InitAsBubbleAttachedToAnchor( |
68 gfx::NativeView parent, | 68 gfx::NativeView parent, |
69 PaginationModel* pagination_model, | 69 PaginationModel* pagination_model, |
70 views::View* anchor, | 70 views::View* anchor, |
71 const gfx::Vector2d& anchor_offset, | 71 const gfx::Vector2d& anchor_offset, |
72 views::BubbleBorder::Arrow arrow, | 72 views::BubbleBorder::Arrow arrow, |
73 bool border_accepts_events) { | 73 bool border_accepts_events) { |
74 set_anchor_view(anchor); | 74 SetAnchorView(anchor); |
75 InitAsBubbleInternal( | 75 InitAsBubbleInternal( |
76 parent, pagination_model, arrow, border_accepts_events, anchor_offset); | 76 parent, pagination_model, arrow, border_accepts_events, anchor_offset); |
77 } | 77 } |
78 | 78 |
79 void AppListView::InitAsBubbleAtFixedLocation( | 79 void AppListView::InitAsBubbleAtFixedLocation( |
80 gfx::NativeView parent, | 80 gfx::NativeView parent, |
81 PaginationModel* pagination_model, | 81 PaginationModel* pagination_model, |
82 const gfx::Point& anchor_point_in_screen, | 82 const gfx::Point& anchor_point_in_screen, |
83 views::BubbleBorder::Arrow arrow, | 83 views::BubbleBorder::Arrow arrow, |
84 bool border_accepts_events) { | 84 bool border_accepts_events) { |
85 set_anchor_view(NULL); | 85 SetAnchorView(NULL); |
86 set_anchor_rect(gfx::Rect(anchor_point_in_screen, gfx::Size())); | 86 set_anchor_rect(gfx::Rect(anchor_point_in_screen, gfx::Size())); |
87 InitAsBubbleInternal( | 87 InitAsBubbleInternal( |
88 parent, pagination_model, arrow, border_accepts_events, gfx::Vector2d()); | 88 parent, pagination_model, arrow, border_accepts_events, gfx::Vector2d()); |
89 } | 89 } |
90 | 90 |
91 void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) { | 91 void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) { |
92 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); | 92 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); |
93 SizeToContents(); // Recalcuates with new border. | 93 SizeToContents(); // Recalcuates with new border. |
94 GetBubbleFrameView()->SchedulePaint(); | 94 GetBubbleFrameView()->SchedulePaint(); |
95 } | 95 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 void AppListView::OnAppListModelSigninStatusChanged() { | 317 void AppListView::OnAppListModelSigninStatusChanged() { |
318 OnSigninStatusChanged(); | 318 OnSigninStatusChanged(); |
319 } | 319 } |
320 | 320 |
321 void AppListView::OnAppListModelUsersChanged() { | 321 void AppListView::OnAppListModelUsersChanged() { |
322 OnSigninStatusChanged(); | 322 OnSigninStatusChanged(); |
323 } | 323 } |
324 | 324 |
325 } // namespace app_list | 325 } // namespace app_list |
OLD | NEW |