summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 16:47:13 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 16:47:13 +0000
commit7f7f65c6dec941a0be8d3aac48d7241f03ff0dbe (patch)
tree4b27055eda57b685cf6183aa4684a6ec606f902b
parent59383c78c7b67b435ff4970060213928e1f153b8 (diff)
downloadchromium_src-7f7f65c6dec941a0be8d3aac48d7241f03ff0dbe.zip
chromium_src-7f7f65c6dec941a0be8d3aac48d7241f03ff0dbe.tar.gz
chromium_src-7f7f65c6dec941a0be8d3aac48d7241f03ff0dbe.tar.bz2
Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.
In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes these in ash/. BUG=232084 Review URL: https://codereview.chromium.org/14297013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194609 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/accelerators/accelerator_controller.cc18
-rw-r--r--ash/desktop_background/desktop_background_controller.cc10
-rw-r--r--ash/desktop_background/desktop_background_widget_controller.cc6
-rw-r--r--ash/display/display_controller.cc10
-rw-r--r--ash/display/output_configurator_animation.cc2
-rw-r--r--ash/drag_drop/drag_drop_controller.cc8
-rw-r--r--ash/focus_cycler_unittest.cc4
-rw-r--r--ash/launcher/launcher_view.cc10
-rw-r--r--ash/root_window_controller.cc10
-rw-r--r--ash/shelf/shelf_layout_manager.cc2
-rw-r--r--ash/shelf/shelf_widget.cc6
-rw-r--r--ash/shell.cc22
-rw-r--r--ash/system/tray/system_tray.cc28
-rw-r--r--ash/system/tray/system_tray_bubble.cc2
-rw-r--r--ash/system/tray/tray_item_view.cc2
-rw-r--r--ash/system/tray_update.cc2
-rw-r--r--ash/test/ash_test_base.cc2
-rw-r--r--ash/test/shell_test_api.cc2
-rw-r--r--ash/wm/custom_frame_view_ash_unittest.cc2
-rw-r--r--ash/wm/drag_window_resizer.cc2
-rw-r--r--ash/wm/event_rewriter_event_filter.cc4
-rw-r--r--ash/wm/gestures/shelf_gesture_handler.cc4
-rw-r--r--ash/wm/gestures/two_finger_drag_handler.cc2
-rw-r--r--ash/wm/image_cursors.cc4
-rw-r--r--ash/wm/maximize_bubble_controller.cc2
-rw-r--r--ash/wm/panels/panel_frame_view.cc12
-rw-r--r--ash/wm/screen_dimmer.cc4
-rw-r--r--ash/wm/session_state_animator.cc2
-rw-r--r--ash/wm/session_state_controller_impl2.cc4
-rw-r--r--ash/wm/toplevel_window_event_handler.cc12
-rw-r--r--ash/wm/window_cycle_controller.cc2
-rw-r--r--ash/wm/workspace/frame_maximize_button.cc18
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc10
-rw-r--r--ash/wm/workspace/workspace_cycler.cc4
-rw-r--r--ash/wm/workspace/workspace_manager.cc4
-rw-r--r--ash/wm/workspace/workspace_window_resizer.cc4
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc2
37 files changed, 122 insertions, 122 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index a98c4b36..6450c87 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -400,7 +400,7 @@ void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) {
}
bool AcceleratorController::Process(const ui::Accelerator& accelerator) {
- if (ime_control_delegate_.get()) {
+ if (ime_control_delegate_) {
return accelerator_manager_->Process(
ime_control_delegate_->RemapAccelerator(accelerator));
}
@@ -567,7 +567,7 @@ bool AcceleratorController::PerformAction(int action,
// Return true to prevent propagation of the key event.
return true;
case TAKE_PARTIAL_SCREENSHOT:
- if (screenshot_delegate_.get()) {
+ if (screenshot_delegate_) {
ash::PartialScreenshotView::StartPartialScreenshot(
screenshot_delegate_.get());
}
@@ -619,20 +619,20 @@ bool AcceleratorController::PerformAction(int action,
shell->caps_lock_delegate()->ToggleCapsLock();
return true;
case BRIGHTNESS_DOWN:
- if (brightness_control_delegate_.get())
+ if (brightness_control_delegate_)
return brightness_control_delegate_->HandleBrightnessDown(accelerator);
break;
case BRIGHTNESS_UP:
- if (brightness_control_delegate_.get())
+ if (brightness_control_delegate_)
return brightness_control_delegate_->HandleBrightnessUp(accelerator);
break;
case KEYBOARD_BRIGHTNESS_DOWN:
- if (keyboard_brightness_control_delegate_.get())
+ if (keyboard_brightness_control_delegate_)
return keyboard_brightness_control_delegate_->
HandleKeyboardBrightnessDown(accelerator);
break;
case KEYBOARD_BRIGHTNESS_UP:
- if (keyboard_brightness_control_delegate_.get())
+ if (keyboard_brightness_control_delegate_)
return keyboard_brightness_control_delegate_->
HandleKeyboardBrightnessUp(accelerator);
break;
@@ -711,17 +711,17 @@ bool AcceleratorController::PerformAction(int action,
// TODO(mazda): Fix crbug.com/158217
return false;
}
- if (ime_control_delegate_.get())
+ if (ime_control_delegate_)
return ime_control_delegate_->HandleNextIme();
break;
case PREVIOUS_IME:
- if (ime_control_delegate_.get())
+ if (ime_control_delegate_)
return ime_control_delegate_->HandlePreviousIme();
break;
case PRINT_UI_HIERARCHIES:
return HandlePrintUIHierarchies();
case SWITCH_IME:
- if (ime_control_delegate_.get())
+ if (ime_control_delegate_)
return ime_control_delegate_->HandleSwitchIme(accelerator);
break;
case SELECT_WIN_0:
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 385e3df..ba5ba23 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -129,7 +129,7 @@ DesktopBackgroundController::~DesktopBackgroundController() {
}
gfx::ImageSkia DesktopBackgroundController::GetWallpaper() const {
- if (current_wallpaper_.get())
+ if (current_wallpaper_)
return current_wallpaper_->wallpaper_image();
return gfx::ImageSkia();
}
@@ -145,7 +145,7 @@ void DesktopBackgroundController::RemoveObserver(
}
WallpaperLayout DesktopBackgroundController::GetWallpaperLayout() const {
- if (current_wallpaper_.get())
+ if (current_wallpaper_)
return current_wallpaper_->wallpaper_info().layout;
return WALLPAPER_LAYOUT_CENTER_CROPPED;
}
@@ -157,9 +157,9 @@ gfx::ImageSkia DesktopBackgroundController::GetCurrentWallpaperImage() {
}
int DesktopBackgroundController::GetWallpaperIDR() const {
- if (wallpaper_loader_.get())
+ if (wallpaper_loader_)
return wallpaper_loader_->idr();
- else if (current_wallpaper_.get())
+ else if (current_wallpaper_)
return current_wallpaper_->wallpaper_info().idr;
else
return -1;
@@ -224,7 +224,7 @@ void DesktopBackgroundController::SetCustomWallpaper(
void DesktopBackgroundController::CancelPendingWallpaperOperation() {
// Set canceled flag of previous request to skip unneeded loading.
- if (wallpaper_loader_.get())
+ if (wallpaper_loader_)
wallpaper_loader_->Cancel();
// Cancel reply callback for previous request.
diff --git a/ash/desktop_background/desktop_background_widget_controller.cc b/ash/desktop_background/desktop_background_widget_controller.cc
index 5b93452..98d1ba4 100644
--- a/ash/desktop_background/desktop_background_widget_controller.cc
+++ b/ash/desktop_background/desktop_background_widget_controller.cc
@@ -39,7 +39,7 @@ DesktopBackgroundWidgetController::~DesktopBackgroundWidgetController() {
widget_->RemoveObserver(this);
widget_->CloseNow();
widget_ = NULL;
- } else if (layer_.get())
+ } else if (layer_)
layer_.reset(NULL);
}
@@ -52,7 +52,7 @@ void DesktopBackgroundWidgetController::OnWidgetDestroying(
void DesktopBackgroundWidgetController::SetBounds(gfx::Rect bounds) {
if (widget_)
widget_->SetBounds(bounds);
- else if (layer_.get())
+ else if (layer_)
layer_->SetBounds(bounds);
}
@@ -64,7 +64,7 @@ bool DesktopBackgroundWidgetController::Reparent(aura::RootWindow* root_window,
root_window->GetChildById(dest_container));
return true;
}
- if (layer_.get()) {
+ if (layer_) {
ui::Layer* layer = layer_.get();
root_window->GetChildById(src_container)->layer()->Remove(layer);
root_window->GetChildById(dest_container)->layer()->Add(layer);
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 454290d..b534bbe 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -621,7 +621,7 @@ DisplayLayout DisplayController::GetRegisteredDisplayLayout(
}
void DisplayController::CycleDisplayMode() {
- if (limiter_.get()) {
+ if (limiter_) {
if (limiter_->IsThrottled())
return;
limiter_->SetThrottleTimeout(kCycleDisplayThrottleTimeoutMs);
@@ -645,7 +645,7 @@ void DisplayController::CycleDisplayMode() {
}
void DisplayController::SwapPrimaryDisplay() {
- if (limiter_.get()) {
+ if (limiter_) {
if (limiter_->IsThrottled())
return;
limiter_->SetThrottleTimeout(kSwapDisplayThrottleTimeoutMs);
@@ -820,7 +820,7 @@ void DisplayController::UpdateMouseCursor(const gfx::Point& point_in_native) {
}
void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
- if (limiter_.get())
+ if (limiter_)
limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
const internal::DisplayInfo& display_info =
GetDisplayManager()->GetDisplayInfo(display.id());
@@ -833,7 +833,7 @@ void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
}
void DisplayController::OnDisplayAdded(const gfx::Display& display) {
- if (limiter_.get())
+ if (limiter_)
limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
if (primary_root_window_for_replace_) {
@@ -859,7 +859,7 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) {
}
void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
- if (limiter_.get())
+ if (limiter_)
limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
aura::RootWindow* root_to_delete = root_windows_[display.id()];
diff --git a/ash/display/output_configurator_animation.cc b/ash/display/output_configurator_animation.cc
index 6c6d78d..a57b1b9 100644
--- a/ash/display/output_configurator_animation.cc
+++ b/ash/display/output_configurator_animation.cc
@@ -216,7 +216,7 @@ void OutputConfiguratorAnimation::OnDisplayModeChangeFailed(
}
void OutputConfiguratorAnimation::ClearHidingLayers() {
- if (timer_.get()) {
+ if (timer_) {
timer_->Stop();
timer_.reset();
}
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 1500dae..f35039c 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -155,9 +155,9 @@ DragDropController::DragDropController()
DragDropController::~DragDropController() {
Shell::GetInstance()->RemovePreTargetHandler(this);
Cleanup();
- if (cancel_animation_.get())
+ if (cancel_animation_)
cancel_animation_->End();
- if (drag_image_.get())
+ if (drag_image_)
drag_image_.reset();
}
@@ -224,7 +224,7 @@ int DragDropController::StartDragAndDrop(
drag_window_ = NULL;
// Ends cancel animation if it's in progress.
- if (cancel_animation_.get())
+ if (cancel_animation_)
cancel_animation_->End();
#if !defined(OS_MACOSX)
@@ -487,7 +487,7 @@ void DragDropController::AnimationEnded(const ui::Animation* animation) {
// started. We do not want to destroy the drag image in that case.
if (!IsDragDropInProgress())
drag_image_.reset();
- if (pending_long_tap_.get()) {
+ if (pending_long_tap_) {
// If not in a nested message loop, we can forward the long tap right now.
if (!should_block_during_drag_drop_)
ForwardPendingLongTap();
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index bb75052..0ff7a9b 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -49,7 +49,7 @@ class FocusCyclerTest : public AshTestBase {
}
virtual void TearDown() OVERRIDE {
- if (tray_.get()) {
+ if (tray_) {
GetStatusAreaWidgetDelegate(tray_->GetWidget())->
SetFocusCyclerForTesting(NULL);
tray_.reset();
@@ -65,7 +65,7 @@ class FocusCyclerTest : public AshTestBase {
protected:
// Creates the system tray, returning true on success.
bool CreateTray() {
- if (tray_.get())
+ if (tray_)
return false;
aura::Window* parent = Shell::GetPrimaryRootWindowController()->
GetContainer(ash::internal::kShellWindowId_StatusContainer);
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index c4a9d56..810baed 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -440,7 +440,7 @@ void LauncherView::OnShelfAlignmentChanged() {
view_model_->view_at(i)->Layout();
}
tooltip_->UpdateArrow();
- if (overflow_bubble_.get())
+ if (overflow_bubble_)
overflow_bubble_->Hide();
}
@@ -675,7 +675,7 @@ void LauncherView::CalculateIdealBounds(IdealBounds* bounds) {
if (overflow_bubble_.get() && overflow_bubble_->IsShowing())
UpdateOverflowRange(overflow_bubble_->launcher_view());
} else {
- if (overflow_bubble_.get())
+ if (overflow_bubble_)
overflow_bubble_->Hide();
}
}
@@ -935,7 +935,7 @@ void LauncherView::ToggleOverflowBubble() {
return;
}
- if (!overflow_bubble_.get())
+ if (!overflow_bubble_)
overflow_bubble_.reset(new OverflowBubble());
LauncherView* overflow_view = new LauncherView(
@@ -1406,7 +1406,7 @@ void LauncherView::ShowContextMenuForView(views::View* source,
scoped_ptr<ui::MenuModel> menu_model(delegate_->CreateContextMenu(
model_->items()[view_index],
source->GetWidget()->GetNativeView()->GetRootWindow()));
- if (!menu_model.get())
+ if (!menu_model)
return;
base::AutoReset<LauncherID> reseter(
&context_menu_id_,
@@ -1485,7 +1485,7 @@ void LauncherView::ShowMenu(
// Unpinning an item will reset the |launcher_menu_runner_| before coming
// here.
- if (launcher_menu_runner_.get())
+ if (launcher_menu_runner_)
closing_event_time_ = launcher_menu_runner_->closing_event_time();
Shell::GetInstance()->UpdateShelfVisibility();
}
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 6a8e815..165a61d 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -207,7 +207,7 @@ void RootWindowController::Shutdown() {
SetTouchObserverHUD(NULL);
CloseChildWindows();
- if (Shell::GetActiveRootWindow() == root_window_.get()) {
+ if (Shell::GetActiveRootWindow() == root_window_) {
Shell::GetInstance()->set_active_root_window(
Shell::GetPrimaryRootWindow() == root_window_.get() ?
NULL : Shell::GetPrimaryRootWindow());
@@ -348,7 +348,7 @@ void RootWindowController::ShowLauncher() {
void RootWindowController::OnLoginStateChanged(user::LoginStatus status) {
// TODO(oshima): remove if when launcher per display is enabled by
// default.
- if (shelf_.get())
+ if (shelf_)
shelf_->shelf_layout_manager()->UpdateVisibilityState();
}
@@ -382,7 +382,7 @@ void RootWindowController::CloseChildWindows() {
}
// TODO(harrym): Remove when Status Area Widget is a child view.
- if (shelf_.get())
+ if (shelf_)
shelf_->ShutdownStatusAreaWidget();
if (shelf_.get() && shelf_->shelf_layout_manager())
@@ -441,7 +441,7 @@ void RootWindowController::MoveWindowsTo(aura::RootWindow* dst) {
}
void RootWindowController::SetTouchObserverHUD(TouchObserverHUD* hud) {
- if (touch_observer_hud_.get())
+ if (touch_observer_hud_)
root_window_->RemovePreTargetHandler(touch_observer_hud_.get());
if (hud)
root_window_->AddPreTargetHandler(hud);
@@ -466,7 +466,7 @@ void RootWindowController::ShowContextMenu(
DCHECK(Shell::GetInstance()->delegate());
scoped_ptr<ui::MenuModel> menu_model(
Shell::GetInstance()->delegate()->CreateContextMenu(target));
- if (!menu_model.get())
+ if (!menu_model)
return;
internal::DesktopBackgroundWidgetController* background =
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 3f168e2..70ca088 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -537,7 +537,7 @@ void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
if (state.visibility_state == SHELF_AUTO_HIDE) {
// When state is SHELF_AUTO_HIDE we need to track when the mouse is over the
// launcher to unhide the shelf. AutoHideEventFilter does that for us.
- if (!event_filter_.get())
+ if (!event_filter_)
event_filter_.reset(new AutoHideEventFilter(this));
} else {
event_filter_.reset(NULL);
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 1e2da78..fb4147e 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -343,7 +343,7 @@ bool ShelfWidget::DelegateView::GetDimmed() const {
}
void ShelfWidget::DelegateView::SetWidgetBounds(const gfx::Rect bounds) {
- if (dimmer_.get())
+ if (dimmer_)
dimmer_->SetBounds(bounds);
}
@@ -486,7 +486,7 @@ bool ShelfWidget::GetDimsShelf() const {
}
void ShelfWidget::CreateLauncher() {
- if (!launcher_.get()) {
+ if (!launcher_) {
Shell* shell = Shell::GetInstance();
// This needs to be called before launcher_model().
shell->GetLauncherDelegate();
@@ -512,7 +512,7 @@ bool ShelfWidget::IsLauncherVisible() const {
}
void ShelfWidget::SetLauncherVisibility(bool visible) {
- if (launcher_.get())
+ if (launcher_)
launcher_->SetVisible(visible);
}
diff --git a/ash/shell.cc b/ash/shell.cc
index 9356cfc..a2f7e0a 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -246,7 +246,7 @@ Shell::~Shell() {
RemovePreTargetHandler(overlay_filter_.get());
RemovePreTargetHandler(input_method_filter_.get());
RemovePreTargetHandler(window_modality_controller_.get());
- if (mouse_cursor_filter_.get())
+ if (mouse_cursor_filter_)
RemovePreTargetHandler(mouse_cursor_filter_.get());
RemovePreTargetHandler(system_gesture_filter_.get());
#if !defined(OS_MACOSX)
@@ -306,11 +306,11 @@ Shell::~Shell() {
activation_controller_.reset();
#if defined(OS_CHROMEOS)
- if (display_change_observer_.get())
+ if (display_change_observer_)
output_configurator_->RemoveObserver(display_change_observer_.get());
- if (output_configurator_animation_.get())
+ if (output_configurator_animation_)
output_configurator_->RemoveObserver(output_configurator_animation_.get());
- if (display_error_observer_.get())
+ if (display_error_observer_)
output_configurator_->RemoveObserver(display_error_observer_.get());
base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow(
output_configurator());
@@ -554,7 +554,7 @@ void Shell::Init() {
// This controller needs to be set before SetupManagedWindowMode.
desktop_background_controller_.reset(new DesktopBackgroundController());
user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
- if (!user_wallpaper_delegate_.get())
+ if (!user_wallpaper_delegate_)
user_wallpaper_delegate_.reset(new DummyUserWallpaperDelegate());
// StatusAreaWidget uses Shell's CapsLockDelegate.
@@ -573,7 +573,7 @@ void Shell::Init() {
// Initialize system_tray_delegate_ before initializing StatusAreaWidget.
system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate());
- if (!system_tray_delegate_.get())
+ if (!system_tray_delegate_)
system_tray_delegate_.reset(SystemTrayDelegate::CreateDummyDelegate());
// Creates StatusAreaWidget.
@@ -629,7 +629,7 @@ void Shell::ToggleAppList(aura::Window* window) {
// If the context window is not given, show it on the active root window.
if (!window)
window = GetActiveRootWindow();
- if (!app_list_controller_.get())
+ if (!app_list_controller_)
app_list_controller_.reset(new internal::AppListController);
app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window);
}
@@ -780,7 +780,7 @@ void Shell::SetDimming(bool should_dim) {
}
void Shell::CreateModalBackground(aura::Window* window) {
- if (!modality_filter_.get()) {
+ if (!modality_filter_) {
modality_filter_.reset(new internal::SystemModalContainerEventFilter(this));
AddPreTargetHandler(modality_filter_.get());
}
@@ -822,7 +822,7 @@ SystemTray* Shell::GetPrimarySystemTray() {
}
LauncherDelegate* Shell::GetLauncherDelegate() {
- if (!launcher_delegate_.get()) {
+ if (!launcher_delegate_) {
launcher_model_.reset(new LauncherModel);
launcher_delegate_.reset(
delegate_->CreateLauncherDelegate(launcher_model_.get()));
@@ -881,11 +881,11 @@ void Shell::InitRootWindowController(
aura::client::SetTooltipClient(root_window, tooltip_controller_.get());
aura::client::SetEventClient(root_window, event_client_.get());
- if (nested_dispatcher_controller_.get()) {
+ if (nested_dispatcher_controller_) {
aura::client::SetDispatcherClient(root_window,
nested_dispatcher_controller_.get());
}
- if (user_action_client_.get())
+ if (user_action_client_)
aura::client::SetUserActionClient(root_window, user_action_client_.get());
root_window->SetCursor(ui::kCursorPointer);
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 8cbfddc..2418f80 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -213,7 +213,7 @@ void SystemTray::ShowDetailedView(SystemTrayItem* item,
std::vector<SystemTrayItem*> items;
items.push_back(item);
ShowItems(items, true, activate, creation_type, GetTrayXOffset(item));
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
}
@@ -244,7 +244,7 @@ void SystemTray::HideNotificationView(SystemTrayItem* item) {
return;
notification_items_.erase(found_iter);
// Only update the notification bubble if visible (i.e. don't create one).
- if (notification_bubble_.get())
+ if (notification_bubble_)
UpdateNotificationBubble();
}
@@ -271,7 +271,7 @@ void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
void SystemTray::SetHideNotifications(bool hide_notifications) {
- if (notification_bubble_.get())
+ if (notification_bubble_)
notification_bubble_->bubble()->SetVisible(!hide_notifications);
hide_notifications_ = hide_notifications;
}
@@ -289,7 +289,7 @@ bool SystemTray::HasNotificationBubble() const {
}
internal::SystemTrayBubble* SystemTray::GetSystemBubble() {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return NULL;
return system_bubble_->bubble();
}
@@ -302,21 +302,21 @@ bool SystemTray::IsAnyBubbleVisible() const {
}
bool SystemTray::IsMouseInNotificationBubble() const {
- if (!notification_bubble_.get())
+ if (!notification_bubble_)
return false;
return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains(
Shell::GetScreen()->GetCursorScreenPoint());
}
bool SystemTray::CloseSystemBubbleForTest() const {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return false;
system_bubble_->bubble()->Close();
return true;
}
bool SystemTray::CloseNotificationBubbleForTest() const {
- if (!notification_bubble_.get())
+ if (!notification_bubble_)
return false;
notification_bubble_->bubble()->Close();
return true;
@@ -474,20 +474,20 @@ void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
// Destroy any existing bubble so that it is rebuilt correctly.
system_bubble_.reset();
// Rebuild any notification bubble.
- if (notification_bubble_.get()) {
+ if (notification_bubble_) {
notification_bubble_.reset();
UpdateNotificationBubble();
}
}
void SystemTray::AnchorUpdated() {
- if (notification_bubble_.get()) {
+ if (notification_bubble_) {
notification_bubble_->bubble_view()->UpdateBubble();
// Ensure that the notification buble is above the launcher/status area.
notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
UpdateBubbleViewArrow(notification_bubble_->bubble_view());
}
- if (system_bubble_.get()) {
+ if (system_bubble_) {
system_bubble_->bubble_view()->UpdateBubble();
UpdateBubbleViewArrow(system_bubble_->bubble_view());
}
@@ -509,26 +509,26 @@ void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
}
bool SystemTray::ClickedOutsideBubble() {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return false;
HideBubbleWithView(system_bubble_->bubble_view());
return true;
}
void SystemTray::BubbleViewDestroyed() {
- if (system_bubble_.get()) {
+ if (system_bubble_) {
system_bubble_->bubble()->DestroyItemViews();
system_bubble_->bubble()->BubbleViewDestroyed();
}
}
void SystemTray::OnMouseEnteredView() {
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->StopAutoCloseTimer();
}
void SystemTray::OnMouseExitedView() {
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->RestartAutoCloseTimer();
}
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index 77d1056..196cc78 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -225,7 +225,7 @@ void SystemTrayBubble::UpdateView(
bubble_view_->SetMaxHeight(0); // Clear max height limit.
}
- if (scoped_layer.get()) {
+ if (scoped_layer) {
// When transitioning from default view to detailed view, animate the new
// view (slide in from the right).
if (bubble_type == BUBBLE_TYPE_DETAILED) {
diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc
index 835e55e..632dcbf 100644
--- a/ash/system/tray/tray_item_view.cc
+++ b/ash/system/tray/tray_item_view.cc
@@ -51,7 +51,7 @@ void TrayItemView::SetVisible(bool set_visible) {
return;
}
- if (!animation_.get()) {
+ if (!animation_) {
animation_.reset(new ui::SlideAnimation(this));
animation_->SetSlideDuration(GetAnimationDurationMS());
animation_->SetTweenType(ui::Tween::LINEAR);
diff --git a/ash/system/tray_update.cc b/ash/system/tray_update.cc
index e56d8c1..1fcbcf2 100644
--- a/ash/system/tray_update.cc
+++ b/ash/system/tray_update.cc
@@ -181,7 +181,7 @@ views::View* TrayUpdate::CreateDetailedView(user::LoginStatus status) {
}
void TrayUpdate::DestroyDetailedView() {
- if (nagger_.get()) {
+ if (nagger_) {
// The nagger was being displayed. Now that the detailed view is being
// closed, that means either the user clicks on it to restart, or the user
// didn't click on it to restart. In either case, start the timer to show
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 24b004f..6c2e7fa 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -187,7 +187,7 @@ void AshTestBase::TearDown() {
}
aura::test::EventGenerator& AshTestBase::GetEventGenerator() {
- if (!event_generator_.get()) {
+ if (!event_generator_) {
event_generator_.reset(
new aura::test::EventGenerator(new AshEventGeneratorDelegate()));
}
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index 72b869a..126beab 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -50,7 +50,7 @@ LauncherModel* ShellTestApi::launcher_model() {
void ShellTestApi::DisableOutputConfiguratorAnimation() {
#if defined(OS_CHROMEOS)
- if (shell_->output_configurator_animation_.get()) {
+ if (shell_->output_configurator_animation_) {
shell_->output_configurator_->RemoveObserver(
shell_->output_configurator_animation_.get());
shell_->output_configurator_animation_.reset();
diff --git a/ash/wm/custom_frame_view_ash_unittest.cc b/ash/wm/custom_frame_view_ash_unittest.cc
index 43b65e9..e5cc732 100644
--- a/ash/wm/custom_frame_view_ash_unittest.cc
+++ b/ash/wm/custom_frame_view_ash_unittest.cc
@@ -99,7 +99,7 @@ class CustomFrameViewAshTest : public ash::test::AshTestBase {
}
virtual void TearDown() OVERRIDE {
- if (views_delegate_.get()) {
+ if (views_delegate_) {
views::ViewsDelegate::views_delegate = NULL;
views_delegate_.reset();
}
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index 60b763f..d0f9775 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -164,7 +164,7 @@ void DragWindowResizer::UpdateDragWindow(const gfx::Rect& bounds,
static_cast<float>(bounds.width() * bounds.height());
if (fraction_in_another_window > 0) {
- if (!drag_window_controller_.get()) {
+ if (!drag_window_controller_) {
drag_window_controller_.reset(
new DragWindowController(GetTarget()));
// Always show the drag phantom on the |another_root| window.
diff --git a/ash/wm/event_rewriter_event_filter.cc b/ash/wm/event_rewriter_event_filter.cc
index 8f204e0..2ef4853 100644
--- a/ash/wm/event_rewriter_event_filter.cc
+++ b/ash/wm/event_rewriter_event_filter.cc
@@ -21,7 +21,7 @@ void EventRewriterEventFilter::SetEventRewriterDelegate(
}
void EventRewriterEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- if (!delegate_.get())
+ if (!delegate_)
return;
// Do not consume a translated key event which is generated by an IME.
@@ -40,7 +40,7 @@ void EventRewriterEventFilter::OnKeyEvent(ui::KeyEvent* event) {
}
void EventRewriterEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- if (!delegate_.get())
+ if (!delegate_)
return;
switch (delegate_->RewriteOrFilterLocatedEvent(event)) {
diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc
index 2fa7905..847820d 100644
--- a/ash/wm/gestures/shelf_gesture_handler.cc
+++ b/ash/wm/gestures/shelf_gesture_handler.cc
@@ -55,7 +55,7 @@ bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) {
return false;
if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- if (tray_handler_.get()) {
+ if (tray_handler_) {
if (!tray_handler_->UpdateGestureDrag(event))
tray_handler_.reset();
} else if (shelf->UpdateGestureDrag(event) ==
@@ -70,7 +70,7 @@ bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) {
if (event.type() == ui::ET_GESTURE_SCROLL_END ||
event.type() == ui::ET_SCROLL_FLING_START) {
- if (tray_handler_.get()) {
+ if (tray_handler_) {
tray_handler_->CompleteGestureDrag(event);
tray_handler_.reset();
}
diff --git a/ash/wm/gestures/two_finger_drag_handler.cc b/ash/wm/gestures/two_finger_drag_handler.cc
index 9decd47..53475fe 100644
--- a/ash/wm/gestures/two_finger_drag_handler.cc
+++ b/ash/wm/gestures/two_finger_drag_handler.cc
@@ -107,7 +107,7 @@ bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
return false;
}
- if (!window_resizer_.get()) {
+ if (!window_resizer_) {
// Consume all two-finger gestures on a normal window.
return event.details().touch_points() == 2 &&
target->type() == aura::client::WINDOW_TYPE_NORMAL &&
diff --git a/ash/wm/image_cursors.cc b/ash/wm/image_cursors.cc
index c1bd7e7..3d8e4ab 100644
--- a/ash/wm/image_cursors.cc
+++ b/ash/wm/image_cursors.cc
@@ -61,7 +61,7 @@ ImageCursors::~ImageCursors() {
}
gfx::Display ImageCursors::GetDisplay() const {
- if (!cursor_loader_.get()) {
+ if (!cursor_loader_) {
NOTREACHED();
// Returning default on release build as it's not serious enough to crash
// even if this ever happens.
@@ -72,7 +72,7 @@ gfx::Display ImageCursors::GetDisplay() const {
bool ImageCursors::SetDisplay(const gfx::Display& display) {
float device_scale_factor = display.device_scale_factor();
- if (!cursor_loader_.get()) {
+ if (!cursor_loader_) {
cursor_loader_.reset(ui::CursorLoader::Create());
} else if (cursor_loader_->display().rotation() == display.rotation() &&
cursor_loader_->display().device_scale_factor() ==
diff --git a/ash/wm/maximize_bubble_controller.cc b/ash/wm/maximize_bubble_controller.cc
index 3913546..f2e3acb 100644
--- a/ash/wm/maximize_bubble_controller.cc
+++ b/ash/wm/maximize_bubble_controller.cc
@@ -798,7 +798,7 @@ views::CustomButton* MaximizeBubbleController::GetButtonForUnitTest(
void MaximizeBubbleController::RequestDestructionThroughOwner() {
// Tell the parent to destroy us (if this didn't happen yet).
- if (timer_.get()) {
+ if (timer_) {
timer_.reset(NULL);
// Informs the owner that the menu is gone and requests |this| destruction.
frame_maximize_button_->DestroyMaximizeMenu();
diff --git a/ash/wm/panels/panel_frame_view.cc b/ash/wm/panels/panel_frame_view.cc
index 176547b..bce53c7 100644
--- a/ash/wm/panels/panel_frame_view.cc
+++ b/ash/wm/panels/panel_frame_view.cc
@@ -59,7 +59,7 @@ void PanelFrameView::InitFramePainter() {
}
void PanelFrameView::Layout() {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return;
frame_painter_->LayoutHeader(this, true);
}
@@ -80,7 +80,7 @@ void PanelFrameView::UpdateWindowIcon() {
}
void PanelFrameView::UpdateWindowTitle() {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return;
frame_painter_->SchedulePaintForTitle(this, title_font_);
}
@@ -90,13 +90,13 @@ void PanelFrameView::GetWindowMask(const gfx::Size&, gfx::Path*) {
}
int PanelFrameView::NonClientHitTest(const gfx::Point& point) {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return HTNOWHERE;
return frame_painter_->NonClientHitTest(this, point);
}
void PanelFrameView::OnPaint(gfx::Canvas* canvas) {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return;
bool paint_as_active = ShouldPaintAsActive();
int theme_image_id = paint_as_active ? IDR_AURA_WINDOW_HEADER_BASE_ACTIVE :
@@ -112,7 +112,7 @@ void PanelFrameView::OnPaint(gfx::Canvas* canvas) {
}
gfx::Rect PanelFrameView::GetBoundsForClientView() const {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return bounds();
return frame_painter_->GetBoundsForClientView(
close_button_->bounds().bottom(),
@@ -121,7 +121,7 @@ gfx::Rect PanelFrameView::GetBoundsForClientView() const {
gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const {
- if (!frame_painter_.get())
+ if (!frame_painter_)
return client_bounds;
return frame_painter_->GetWindowBoundsForClientBounds(
close_button_->bounds().bottom(), client_bounds);
diff --git a/ash/wm/screen_dimmer.cc b/ash/wm/screen_dimmer.cc
index 7a01164..3cb4e96 100644
--- a/ash/wm/screen_dimmer.cc
+++ b/ash/wm/screen_dimmer.cc
@@ -39,7 +39,7 @@ void ScreenDimmer::SetDimming(bool should_dim) {
if (should_dim == currently_dimming_)
return;
- if (!dimming_layer_.get()) {
+ if (!dimming_layer_) {
dimming_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
dimming_layer_->SetColor(SK_ColorBLACK);
dimming_layer_->SetOpacity(0.0f);
@@ -60,7 +60,7 @@ void ScreenDimmer::SetDimming(bool should_dim) {
void ScreenDimmer::OnRootWindowResized(const aura::RootWindow* root,
const gfx::Size& old_size) {
- if (dimming_layer_.get())
+ if (dimming_layer_)
dimming_layer_->SetBounds(gfx::Rect(root->bounds().size()));
}
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index a1ac9ac..35ac4cc 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -614,7 +614,7 @@ void SessionStateAnimator::RunAnimationForWindow(
}
void SessionStateAnimator::CreateForeground() {
- if (foreground_.get())
+ if (foreground_)
return;
aura::Window* window = Shell::GetContainer(
Shell::GetPrimaryRootWindow(),
diff --git a/ash/wm/session_state_controller_impl2.cc b/ash/wm/session_state_controller_impl2.cc
index 4e533a4..f21a8d7 100644
--- a/ash/wm/session_state_controller_impl2.cc
+++ b/ash/wm/session_state_controller_impl2.cc
@@ -587,7 +587,7 @@ void SessionStateControllerImpl2::StartUnlockAnimationAfterUIDestroyed() {
}
void SessionStateControllerImpl2::StoreUnlockedProperties() {
- if (!unlocked_properties_.get()) {
+ if (!unlocked_properties_) {
unlocked_properties_.reset(new UnlockedStateProperties());
unlocked_properties_->background_is_hidden = IsBackgroundHidden();
}
@@ -602,7 +602,7 @@ void SessionStateControllerImpl2::StoreUnlockedProperties() {
}
void SessionStateControllerImpl2::RestoreUnlockedProperties() {
- if (!unlocked_properties_.get())
+ if (!unlocked_properties_)
return;
if (unlocked_properties_->background_is_hidden) {
HideBackground();
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index e62631f..cba921b 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -90,13 +90,13 @@ ToplevelWindowEventHandler::ScopedWindowResizer::ScopedWindowResizer(
: handler_(handler),
resizer_(resizer),
target_container_(NULL) {
- if (resizer_.get())
+ if (resizer_)
resizer_->GetTarget()->AddObserver(this);
}
ToplevelWindowEventHandler::ScopedWindowResizer::~ScopedWindowResizer() {
RemoveHandlers();
- if (resizer_.get())
+ if (resizer_)
resizer_->GetTarget()->RemoveObserver(this);
}
@@ -350,7 +350,7 @@ void ToplevelWindowEventHandler::EndMoveLoop() {
return;
in_move_loop_ = false;
- if (window_resizer_.get()) {
+ if (window_resizer_) {
window_resizer_->resizer()->RevertDrag();
window_resizer_.reset();
}
@@ -361,7 +361,7 @@ void ToplevelWindowEventHandler::OnDisplayConfigurationChanging() {
if (in_move_loop_) {
move_cancelled_ = true;
EndMoveLoop();
- } else if (window_resizer_.get()) {
+ } else if (window_resizer_) {
window_resizer_->resizer()->RevertDrag();
window_resizer_.reset();
}
@@ -381,7 +381,7 @@ void ToplevelWindowEventHandler::CreateScopedWindowResizer(
void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status,
int event_flags) {
scoped_ptr<ScopedWindowResizer> resizer(window_resizer_.release());
- if (resizer.get()) {
+ if (resizer) {
if (status == DRAG_COMPLETE)
resizer->resizer()->CompleteDrag(event_flags);
else
@@ -451,7 +451,7 @@ void ToplevelWindowEventHandler::HandleDrag(
if (event->phase() != ui::EP_PRETARGET)
return;
- if (!window_resizer_.get())
+ if (!window_resizer_)
return;
window_resizer_->resizer()->Drag(
ConvertPointToParent(target, event->location()), event->flags());
diff --git a/ash/wm/window_cycle_controller.cc b/ash/wm/window_cycle_controller.cc
index 0cdfcde..89af6c1 100644
--- a/ash/wm/window_cycle_controller.cc
+++ b/ash/wm/window_cycle_controller.cc
@@ -250,7 +250,7 @@ void WindowCycleController::Step(Direction direction) {
void WindowCycleController::StopCycling() {
windows_.reset();
// Remove our key event filter.
- if (event_handler_.get()) {
+ if (event_handler_) {
Shell::GetInstance()->RemovePreTargetHandler(event_handler_.get());
event_handler_.reset();
}
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index a6262f9..6845365 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -104,7 +104,7 @@ FrameMaximizeButton::~FrameMaximizeButton() {
void FrameMaximizeButton::SnapButtonHovered(SnapType type) {
// Make sure to only show hover operations when no button is pressed and
// a similar snap operation in progress does not get re-applied.
- if (is_snap_enabled_ || (type == snap_type_ && snap_sizer_.get()))
+ if (is_snap_enabled_ || (type == snap_type_ && snap_sizer_))
return;
// Prime the mouse location with the center of the (local) button.
press_location_ = gfx::Point(width() / 2, height() / 2);
@@ -187,7 +187,7 @@ void FrameMaximizeButton::OnWindowDestroying(aura::Window* window) {
void FrameMaximizeButton::OnWidgetActivationChanged(views::Widget* widget,
bool active) {
// Upon losing focus, the control bubble should hide.
- if (!active && maximizer_.get())
+ if (!active && maximizer_)
maximizer_.reset();
}
@@ -207,7 +207,7 @@ bool FrameMaximizeButton::OnMousePressed(const ui::MouseEvent& event) {
void FrameMaximizeButton::OnMouseEntered(const ui::MouseEvent& event) {
ImageButton::OnMouseEntered(event);
- if (!maximizer_.get()) {
+ if (!maximizer_) {
DCHECK(GetWidget());
if (!widget_) {
widget_ = frame_->GetWidget();
@@ -225,7 +225,7 @@ void FrameMaximizeButton::OnMouseExited(const ui::MouseEvent& event) {
ImageButton::OnMouseExited(event);
// Remove the bubble menu when the button is not pressed and the mouse is not
// within the bubble.
- if (!is_snap_enabled_ && maximizer_.get()) {
+ if (!is_snap_enabled_ && maximizer_) {
if (maximizer_->GetBubbleWindow()) {
gfx::Point screen_location = Shell::GetScreen()->GetCursorScreenPoint();
if (!maximizer_->GetBubbleWindow()->GetBoundsInScreen().Contains(
@@ -309,7 +309,7 @@ void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
DCHECK(is_snap_enabled_);
// Prepare the help menu.
- if (!maximizer_.get()) {
+ if (!maximizer_) {
maximizer_.reset(new MaximizeBubbleController(
this,
GetMaximizeBubbleFrameState(),
@@ -379,7 +379,7 @@ void FrameMaximizeButton::Cancel(bool keep_menu_open) {
}
void FrameMaximizeButton::InstallEventFilter() {
- if (escape_event_filter_.get())
+ if (escape_event_filter_)
return;
escape_event_filter_.reset(new EscapeEventFilter(this));
@@ -402,7 +402,7 @@ void FrameMaximizeButton::UpdateSnap(const gfx::Point& location,
bool is_touch) {
SnapType type = SnapTypeForLocation(location);
if (type == snap_type_) {
- if (snap_sizer_.get()) {
+ if (snap_sizer_) {
snap_sizer_->Update(LocationForSnapSizer(location));
phantom_window_->Show(ScreenAsh::ConvertRectToScreen(
frame_->GetWidget()->GetNativeView()->parent(),
@@ -433,11 +433,11 @@ void FrameMaximizeButton::UpdateSnap(const gfx::Point& location,
if (select_default)
snap_sizer_->SelectDefaultSizeAndDisableResize();
}
- if (!phantom_window_.get()) {
+ if (!phantom_window_) {
phantom_window_.reset(new internal::PhantomWindowController(
frame_->GetWidget()->GetNativeWindow()));
}
- if (maximizer_.get()) {
+ if (maximizer_) {
phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow());
maximizer_->SetSnapType(snap_type_);
}
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index 1dea17d..798b5c4 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -162,7 +162,7 @@ void MultiWindowResizeController::Show(Window* window,
// only care about mouse movements from MouseWatcher. This is necessary as
// WorkspaceEventHandler only sees mouse movements over the windows, not all
// windows or over the desktop.
- if (resize_widget_.get())
+ if (resize_widget_)
return;
ResizeWindows windows(DetermineWindows(window, component, point_in_window));
@@ -190,7 +190,7 @@ void MultiWindowResizeController::Show(Window* window,
void MultiWindowResizeController::Hide() {
hide_timer_.Stop();
- if (window_resizer_.get())
+ if (window_resizer_)
return; // Ignore hides while actively resizing.
if (windows_.window1) {
@@ -204,7 +204,7 @@ void MultiWindowResizeController::Hide() {
show_timer_.Stop();
- if (!resize_widget_.get())
+ if (!resize_widget_)
return;
for (size_t i = 0; i < windows_.other_windows.size(); ++i)
@@ -473,7 +473,7 @@ void MultiWindowResizeController::CompleteResize(int event_flags) {
}
void MultiWindowResizeController::CancelResize() {
- if (!window_resizer_.get())
+ if (!window_resizer_)
return; // Happens if window was destroyed and we nuked the WindowResizer.
window_resizer_->RevertDrag();
window_resizer_.reset();
@@ -504,7 +504,7 @@ gfx::Rect MultiWindowResizeController::CalculateResizeWidgetBounds(
bool MultiWindowResizeController::IsOverWindows(
const gfx::Point& location_in_screen) const {
- if (window_resizer_.get())
+ if (window_resizer_)
return true; // Ignore hides while actively resizing.
if (resize_widget_->GetWindowBoundsInScreen().Contains(location_in_screen))
diff --git a/ash/wm/workspace/workspace_cycler.cc b/ash/wm/workspace/workspace_cycler.cc
index 9d4cda1..7f88fc3 100644
--- a/ash/wm/workspace/workspace_cycler.cc
+++ b/ash/wm/workspace/workspace_cycler.cc
@@ -62,12 +62,12 @@ void WorkspaceCycler::SetState(State new_state) {
animator_.get());
animator_->AnimateStartingCycler();
} else if (new_state == STOPPING_CYCLING) {
- if (animator_.get())
+ if (animator_)
animator_->AnimateStoppingCycler();
} else if (new_state == NOT_CYCLING) {
scroll_x_ = 0.0f;
scroll_y_ = 0.0f;
- if (animator_.get()) {
+ if (animator_) {
animator_->AbortAnimations();
animator_.reset();
}
diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
index 2378dd1..ad4d5fd 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -341,7 +341,7 @@ void WorkspaceManager::SetActiveWorkspace(Workspace* workspace,
// It is possible for a user to use accelerator keys to restore windows etc
// while the user is cycling through workspaces.
- if (workspace_cycler_.get())
+ if (workspace_cycler_)
workspace_cycler_->AbortCycling();
pending_workspaces_.erase(workspace);
@@ -422,7 +422,7 @@ void WorkspaceManager::MoveWorkspaceToPendingOrDelete(
// The user may have closed or minimized a window via accelerator keys while
// cycling through workspaces.
- if (workspace_cycler_.get())
+ if (workspace_cycler_)
workspace_cycler_->AbortCycling();
if (workspace == active_workspace_)
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 347954c..5451535 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -774,7 +774,7 @@ void WorkspaceWindowResizer::UpdateSnapPhantomWindow(const gfx::Point& location,
if (snap_type_ == SNAP_NONE)
return;
}
- if (!snap_sizer_.get()) {
+ if (!snap_sizer_) {
SnapSizer::Edge edge = (snap_type_ == SNAP_LEFT_EDGE) ?
SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE;
snap_sizer_.reset(new SnapSizer(window(),
@@ -784,7 +784,7 @@ void WorkspaceWindowResizer::UpdateSnapPhantomWindow(const gfx::Point& location,
} else {
snap_sizer_->Update(location);
}
- if (!snap_phantom_window_controller_.get()) {
+ if (!snap_phantom_window_controller_) {
snap_phantom_window_controller_.reset(
new PhantomWindowController(window()));
}
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index fbab915..75b3085 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -122,7 +122,7 @@ class WorkspaceWindowResizerTest : public test::AshTestBase {
const aura::Window::Windows& windows = parent->children();
for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin();
i != windows.rend(); ++i) {
- if (*i == window_.get() || *i == window2_.get() || *i == window3_.get()) {
+ if (*i == window_ || *i == window2_ || *i == window3_) {
if (!result.empty())
result += " ";
result += base::IntToString((*i)->id());