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

Side by Side Diff: ash/shelf/shelf_widget.cc

Issue 16968003: Rewrite scoped_ptr<T>(NULL) to use the default ctor in ash/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/focus_cycler.h" 7 #include "ash/focus_cycler.h"
8 #include "ash/launcher/launcher_delegate.h" 8 #include "ash/launcher/launcher_delegate.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/launcher/launcher_navigator.h" 10 #include "ash/launcher/launcher_navigator.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (GetDimmed()) 420 if (GetDimmed())
421 return dimmer_view_->GetBoundsInScreen(); 421 return dimmer_view_->GetBoundsInScreen();
422 return gfx::Rect(); 422 return gfx::Rect();
423 } 423 }
424 424
425 void ShelfWidget::DelegateView::UpdateBackground(int alpha) { 425 void ShelfWidget::DelegateView::UpdateBackground(int alpha) {
426 alpha_ = alpha; 426 alpha_ = alpha;
427 SchedulePaint(); 427 SchedulePaint();
428 } 428 }
429 429
430 ShelfWidget::ShelfWidget( 430 ShelfWidget::ShelfWidget(aura::Window* shelf_container,
431 aura::Window* shelf_container, 431 aura::Window* status_container,
432 aura::Window* status_container, 432 internal::WorkspaceController* workspace_controller)
433 internal::WorkspaceController* workspace_controller) : 433 : delegate_view_(new DelegateView(this)),
434 launcher_(NULL), 434 background_animator_(delegate_view_, 0, kLauncherBackgroundAlpha),
435 delegate_view_(new DelegateView(this)), 435 activating_as_fallback_(false),
436 background_animator_(delegate_view_, 0, kLauncherBackgroundAlpha), 436 window_container_(shelf_container) {
437 activating_as_fallback_(false),
438 window_container_(shelf_container) {
439 views::Widget::InitParams params( 437 views::Widget::InitParams params(
440 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 438 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
441 params.transparent = true; 439 params.transparent = true;
442 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 440 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
443 params.parent = shelf_container; 441 params.parent = shelf_container;
444 params.delegate = delegate_view_; 442 params.delegate = delegate_view_;
445 Init(params); 443 Init(params);
446 444
447 // The shelf should not take focus when initially shown. 445 // The shelf should not take focus when initially shown.
448 set_focus_on_creation(false); 446 set_focus_on_creation(false);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return delegate_view_->GetDimmerBoundsForTest(); 574 return delegate_view_->GetDimmerBoundsForTest();
577 return gfx::Rect(); 575 return gfx::Rect();
578 } 576 }
579 577
580 void ShelfWidget::DisableDimmingAnimationsForTest() { 578 void ShelfWidget::DisableDimmingAnimationsForTest() {
581 DCHECK(delegate_view_); 579 DCHECK(delegate_view_);
582 return delegate_view_->disable_dimming_animations_for_test(); 580 return delegate_view_->disable_dimming_animations_for_test();
583 } 581 }
584 582
585 } // namespace ash 583 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698