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

Side by Side Diff: ash/tooltips/tooltip_controller.cc

Issue 9315004: Remove Owner param to EventFilter's ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/ime/input_method_event_filter_unittest.cc ('k') | ash/wm/root_window_event_filter.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/tooltips/tooltip_controller.h" 5 #include "ash/tooltips/tooltip_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 gfx::Screen::GetMonitorAreaNearestPoint(tooltip_rect.origin()); 193 gfx::Screen::GetMonitorAreaNearestPoint(tooltip_rect.origin());
194 widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds)); 194 widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds));
195 } 195 }
196 196
197 }; 197 };
198 198
199 //////////////////////////////////////////////////////////////////////////////// 199 ////////////////////////////////////////////////////////////////////////////////
200 // TooltipController public: 200 // TooltipController public:
201 201
202 TooltipController::TooltipController() 202 TooltipController::TooltipController()
203 : aura::EventFilter(NULL), 203 : tooltip_window_(NULL),
204 tooltip_window_(NULL),
205 tooltip_(new Tooltip), 204 tooltip_(new Tooltip),
206 tooltips_enabled_(true) { 205 tooltips_enabled_(true) {
207 tooltip_timer_.Start(FROM_HERE, 206 tooltip_timer_.Start(FROM_HERE,
208 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs), 207 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
209 this, &TooltipController::TooltipTimerFired); 208 this, &TooltipController::TooltipTimerFired);
210 } 209 }
211 210
212 TooltipController::~TooltipController() { 211 TooltipController::~TooltipController() {
213 if (tooltip_window_) 212 if (tooltip_window_)
214 tooltip_window_->RemoveObserver(this); 213 tooltip_window_->RemoveObserver(this);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 320 }
322 } 321 }
323 } 322 }
324 323
325 bool TooltipController::IsTooltipVisible() { 324 bool TooltipController::IsTooltipVisible() {
326 return tooltip_->IsVisible(); 325 return tooltip_->IsVisible();
327 } 326 }
328 327
329 } // namespace internal 328 } // namespace internal
330 } // namespace ash 329 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ime/input_method_event_filter_unittest.cc ('k') | ash/wm/root_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698