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

Side by Side Diff: chrome/browser/chromeos/ui/setting_level_bubble.cc

Issue 10262002: views: Get rid of CreateViewsBubbleAboveLockScreen() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 #include "chrome/browser/chromeos/ui/setting_level_bubble.h" 5 #include "chrome/browser/chromeos/ui/setting_level_bubble.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h"
10 #include "chrome/browser/chromeos/login/base_login_display_host.h" 11 #include "chrome/browser/chromeos/login/base_login_display_host.h"
11 #include "chrome/browser/chromeos/login/login_display_host.h" 12 #include "chrome/browser/chromeos/login/login_display_host.h"
12 #include "chrome/browser/chromeos/login/login_utils.h" 13 #include "chrome/browser/chromeos/login/login_utils.h"
13 #include "chrome/browser/chromeos/login/webui_login_display.h" 14 #include "chrome/browser/chromeos/login/webui_login_display.h"
14 #include "chrome/browser/chromeos/ui/setting_level_bubble_view.h" 15 #include "chrome/browser/chromeos/ui/setting_level_bubble_view.h"
15 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_list.h" 18 #include "chrome/browser/ui/browser_list.h"
18 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
19 #include "chrome/browser/ui/views/window.h" 20 #include "chrome/browser/ui/views/window.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 current_percent_ = target_percent_; 182 current_percent_ = target_percent_;
182 target_time_ = TimeTicks(); 183 target_time_ = TimeTicks();
183 last_animation_update_time_ = TimeTicks(); 184 last_animation_update_time_ = TimeTicks();
184 last_target_update_time_ = TimeTicks(); 185 last_target_update_time_ = TimeTicks();
185 hide_timer_.Stop(); 186 hide_timer_.Stop();
186 StopAnimation(); 187 StopAnimation();
187 } 188 }
188 189
189 SettingLevelBubbleView* SettingLevelBubble::CreateView() { 190 SettingLevelBubbleView* SettingLevelBubble::CreateView() {
190 SettingLevelBubbleDelegateView* delegate = new SettingLevelBubbleDelegateView; 191 SettingLevelBubbleDelegateView* delegate = new SettingLevelBubbleDelegateView;
191 views::Widget* widget = browser::CreateViewsBubbleAboveLockScreen(delegate); 192 delegate->set_parent_window(ash::Shell::GetInstance()->GetContainer(
193 ash::internal::kShellWindowId_SettingBubbleContainer));
194 views::Widget* widget = views::BubbleDelegateView::CreateBubble(delegate);
192 widget->AddObserver(this); 195 widget->AddObserver(this);
193 // Hold on to the content view. 196 // Hold on to the content view.
194 return delegate->view(); 197 return delegate->view();
195 } 198 }
196 199
197 void SettingLevelBubble::OnHideTimeout() { 200 void SettingLevelBubble::OnHideTimeout() {
198 // Start fading away. 201 // Start fading away.
199 if (view_) { 202 if (view_) {
200 SettingLevelBubbleDelegateView* delegate = 203 SettingLevelBubbleDelegateView* delegate =
201 static_cast<SettingLevelBubbleDelegateView*> 204 static_cast<SettingLevelBubbleDelegateView*>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 262
260 last_target_update_time_ = now; 263 last_target_update_time_ = now;
261 } 264 }
262 265
263 void SettingLevelBubble::StopAnimation() { 266 void SettingLevelBubble::StopAnimation() {
264 animation_timer_.Stop(); 267 animation_timer_.Stop();
265 is_animating_ = false; 268 is_animating_ = false;
266 } 269 }
267 270
268 } // namespace chromeos 271 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/data_promo_notification.cc ('k') | chrome/browser/ui/views/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698