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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_tooltip_manager.h" 5 #include "ash/shelf/shelf_tooltip_manager.h"
6 6
7 #include "ash/shelf/shelf_layout_manager.h" 7 #include "ash/shelf/shelf_layout_manager.h"
8 #include "ash/shelf/shelf_view.h" 8 #include "ash/shelf/shelf_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 view_->SetText(text_); 356 view_->SetText(text_);
357 357
358 gfx::NativeView native_view = widget_->GetNativeView(); 358 gfx::NativeView native_view = widget_->GetNativeView();
359 wm::SetWindowVisibilityAnimationType( 359 wm::SetWindowVisibilityAnimationType(
360 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); 360 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
361 wm::SetWindowVisibilityAnimationTransition( 361 wm::SetWindowVisibilityAnimationTransition(
362 native_view, wm::ANIMATE_HIDE); 362 native_view, wm::ANIMATE_HIDE);
363 } 363 }
364 364
365 void ShelfTooltipManager::CreateTimer(int delay_in_ms) { 365 void ShelfTooltipManager::CreateTimer(int delay_in_ms) {
366 base::OneShotTimer<ShelfTooltipManager>* new_timer = 366 base::OneShotTimer* new_timer = new base::OneShotTimer();
367 new base::OneShotTimer<ShelfTooltipManager>();
368 new_timer->Start(FROM_HERE, 367 new_timer->Start(FROM_HERE,
369 base::TimeDelta::FromMilliseconds(delay_in_ms), 368 base::TimeDelta::FromMilliseconds(delay_in_ms),
370 this, 369 this,
371 &ShelfTooltipManager::ShowInternal); 370 &ShelfTooltipManager::ShowInternal);
372 timer_.reset(new_timer); 371 timer_.reset(new_timer);
373 } 372 }
374 373
375 } // namespace ash 374 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/system/chromeos/network/tray_network_state_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698