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

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

Issue 8368006: Support Windows native textfield, combobox, etc. in new bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate Widget return. Created 9 years, 1 month 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
« no previous file with comments | « no previous file | ui/aura_shell/examples/bubble.cc » ('j') | views/bubble/bubble_delegate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/setting_level_bubble.h" 5 #include "chrome/browser/chromeos/setting_level_bubble.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/chromeos/login/background_view.h" 9 #include "chrome/browser/chromeos/login/background_view.h"
10 #include "chrome/browser/chromeos/login/login_utils.h" 10 #include "chrome/browser/chromeos/login/login_utils.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 last_animation_update_time_ = TimeTicks(); 216 last_animation_update_time_ = TimeTicks();
217 last_target_update_time_ = TimeTicks(); 217 last_target_update_time_ = TimeTicks();
218 hide_timer_.Stop(); 218 hide_timer_.Stop();
219 StopAnimation(); 219 StopAnimation();
220 } 220 }
221 221
222 SettingLevelBubbleView* SettingLevelBubble::CreateView() { 222 SettingLevelBubbleView* SettingLevelBubble::CreateView() {
223 views::Widget* parent = GetToplevelWidget(); 223 views::Widget* parent = GetToplevelWidget();
224 SettingLevelBubbleDelegateView* delegate = 224 SettingLevelBubbleDelegateView* delegate =
225 new SettingLevelBubbleDelegateView(parent); 225 new SettingLevelBubbleDelegateView(parent);
226 views::Widget* widget = 226 views::BubbleDelegateView::CreateBubble(delegate, parent);
227 views::BubbleDelegateView::CreateBubble(delegate, parent); 227 delegate->GetWidget()->AddObserver(this);
228 widget->AddObserver(this);
229 // Hold on to the content view. 228 // Hold on to the content view.
230 return delegate->view(); 229 return delegate->view();
231 } 230 }
232 231
233 void SettingLevelBubble::OnHideTimeout() { 232 void SettingLevelBubble::OnHideTimeout() {
234 // Start fading away. 233 // Start fading away.
235 if (view_) { 234 if (view_) {
236 SettingLevelBubbleDelegateView* delegate = 235 SettingLevelBubbleDelegateView* delegate =
237 static_cast<SettingLevelBubbleDelegateView*> 236 static_cast<SettingLevelBubbleDelegateView*>
238 (view_->GetWidget()->widget_delegate()); 237 (view_->GetWidget()->widget_delegate());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 294
296 last_target_update_time_ = now; 295 last_target_update_time_ = now;
297 } 296 }
298 297
299 void SettingLevelBubble::StopAnimation() { 298 void SettingLevelBubble::StopAnimation() {
300 animation_timer_.Stop(); 299 animation_timer_.Stop();
301 is_animating_ = false; 300 is_animating_ = false;
302 } 301 }
303 302
304 } // namespace chromeos 303 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/aura_shell/examples/bubble.cc » ('j') | views/bubble/bubble_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698