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

Side by Side Diff: chrome/browser/ui/panels/auto_hiding_desktop_bar_win.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
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/ui/panels/auto_hiding_desktop_bar_win.h" 5 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "views/widget/monitor_win.h" 10 #include "views/widget/monitor_win.h"
(...skipping 25 matching lines...) Expand all
36 monitor_ = ::MonitorFromRect(&rect, MONITOR_DEFAULTTOPRIMARY); 36 monitor_ = ::MonitorFromRect(&rect, MONITOR_DEFAULTTOPRIMARY);
37 DCHECK(monitor_); 37 DCHECK(monitor_);
38 38
39 bool taskbar_exists = CheckTaskbars(false); 39 bool taskbar_exists = CheckTaskbars(false);
40 40
41 // If no auto-hiding taskbar exists, we do not need to start the polling 41 // If no auto-hiding taskbar exists, we do not need to start the polling
42 // timer. If a taskbar is then set to auto-hiding, UpdateWorkArea will be 42 // timer. If a taskbar is then set to auto-hiding, UpdateWorkArea will be
43 // called due to the work area change. 43 // called due to the work area change.
44 if (taskbar_exists) { 44 if (taskbar_exists) {
45 if (!polling_timer_.IsRunning()) { 45 if (!polling_timer_.IsRunning()) {
46 polling_timer_.Start(FROM_HERE, 46 polling_timer_.Start(
47 base::TimeDelta::FromMilliseconds(kCheckTaskbarPollingIntervalMs), 47 base::TimeDelta::FromMilliseconds(kCheckTaskbarPollingIntervalMs),
48 this, 48 this,
49 &AutoHidingDesktopBarWin::OnPollingTimer); 49 &AutoHidingDesktopBarWin::OnPollingTimer);
50 } 50 }
51 } else { 51 } else {
52 if (polling_timer_.IsRunning()) 52 if (polling_timer_.IsRunning())
53 polling_timer_.Stop(); 53 polling_timer_.Stop();
54 } 54 }
55 } 55 }
56 56
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if (thickness_changed && notify_observer) 185 if (thickness_changed && notify_observer)
186 observer_->OnAutoHidingDesktopBarThicknessChanged(); 186 observer_->OnAutoHidingDesktopBarThicknessChanged();
187 187
188 return true; 188 return true;
189 } 189 }
190 190
191 // static 191 // static
192 AutoHidingDesktopBar* AutoHidingDesktopBar::Create(Observer* observer) { 192 AutoHidingDesktopBar* AutoHidingDesktopBar::Create(Observer* observer) {
193 return new AutoHidingDesktopBarWin(observer); 193 return new AutoHidingDesktopBarWin(observer);
194 } 194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698