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

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

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/shelf/shelf_widget.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_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 531
532 if (state_.Equals(state)) 532 if (state_.Equals(state))
533 return; // Nothing changed. 533 return; // Nothing changed.
534 534
535 FOR_EACH_OBSERVER(Observer, observers_, 535 FOR_EACH_OBSERVER(Observer, observers_,
536 WillChangeVisibilityState(visibility_state)); 536 WillChangeVisibilityState(visibility_state));
537 537
538 if (state.visibility_state == SHELF_AUTO_HIDE) { 538 if (state.visibility_state == SHELF_AUTO_HIDE) {
539 // When state is SHELF_AUTO_HIDE we need to track when the mouse is over the 539 // When state is SHELF_AUTO_HIDE we need to track when the mouse is over the
540 // launcher to unhide the shelf. AutoHideEventFilter does that for us. 540 // launcher to unhide the shelf. AutoHideEventFilter does that for us.
541 if (!event_filter_.get()) 541 if (!event_filter_)
542 event_filter_.reset(new AutoHideEventFilter(this)); 542 event_filter_.reset(new AutoHideEventFilter(this));
543 } else { 543 } else {
544 event_filter_.reset(NULL); 544 event_filter_.reset(NULL);
545 } 545 }
546 546
547 auto_hide_timer_.Stop(); 547 auto_hide_timer_.Stop();
548 548
549 // Animating the background when transitioning from auto-hide & hidden to 549 // Animating the background when transitioning from auto-hide & hidden to
550 // visible is janky. Update the background immediately in this case. 550 // visible is janky. Update the background immediately in this case.
551 BackgroundAnimator::ChangeType change_type = 551 BackgroundAnimator::ChangeType change_type =
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { 907 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
908 if (state.visibility_state == SHELF_VISIBLE) 908 if (state.visibility_state == SHELF_VISIBLE)
909 return size; 909 return size;
910 if (state.visibility_state == SHELF_AUTO_HIDE) 910 if (state.visibility_state == SHELF_AUTO_HIDE)
911 return kAutoHideSize; 911 return kAutoHideSize;
912 return 0; 912 return 0;
913 } 913 }
914 914
915 } // namespace internal 915 } // namespace internal
916 } // namespace ash 916 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698