OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/app_list/app_list_shower_views.h" | 5 #include "chrome/browser/ui/app_list/app_list_shower_views.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 app_list::AppListView* view; | 110 app_list::AppListView* view; |
111 { | 111 { |
112 // TODO(tapted): Remove ScopedTracker below once crbug.com/431326 is fixed. | 112 // TODO(tapted): Remove ScopedTracker below once crbug.com/431326 is fixed. |
113 tracked_objects::ScopedTracker tracking_profile1( | 113 tracked_objects::ScopedTracker tracking_profile1( |
114 FROM_HERE_WITH_EXPLICIT_FUNCTION("431326 AppListView()")); | 114 FROM_HERE_WITH_EXPLICIT_FUNCTION("431326 AppListView()")); |
115 | 115 |
116 // The app list view manages its own lifetime. | 116 // The app list view manages its own lifetime. |
117 view = new app_list::AppListView(delegate_->GetViewDelegateForCreate()); | 117 view = new app_list::AppListView(delegate_->GetViewDelegateForCreate()); |
118 } | 118 } |
119 | 119 |
120 gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint(); | 120 gfx::Point cursor = gfx::Screen::GetScreen()->GetCursorScreenPoint(); |
121 view->InitAsBubbleAtFixedLocation(NULL, | 121 view->InitAsBubbleAtFixedLocation(NULL, |
122 0, | 122 0, |
123 cursor, | 123 cursor, |
124 views::BubbleBorder::FLOAT, | 124 views::BubbleBorder::FLOAT, |
125 false /* border_accepts_events */); | 125 false /* border_accepts_events */); |
126 return view; | 126 return view; |
127 } | 127 } |
128 | 128 |
129 void AppListShower::UpdateViewForNewProfile() { | 129 void AppListShower::UpdateViewForNewProfile() { |
130 app_list_->SetProfileByPath(profile_->GetPath()); | 130 app_list_->SetProfileByPath(profile_->GetPath()); |
(...skipping 18 matching lines...) Expand all Loading... |
149 FROM_HERE, | 149 FROM_HERE, |
150 base::Bind(&AppListShower::ResetKeepAlive, base::Unretained(this))); | 150 base::Bind(&AppListShower::ResetKeepAlive, base::Unretained(this))); |
151 return; | 151 return; |
152 } | 152 } |
153 ResetKeepAlive(); | 153 ResetKeepAlive(); |
154 } | 154 } |
155 | 155 |
156 void AppListShower::ResetKeepAlive() { | 156 void AppListShower::ResetKeepAlive() { |
157 keep_alive_.reset(); | 157 keep_alive_.reset(); |
158 } | 158 } |
OLD | NEW |