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

Side by Side Diff: ui/aura_shell/shell_tooltip_manager.cc

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, review Created 9 years 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 "ui/aura_shell/shell_tooltip_manager.h" 5 #include "ui/aura_shell/shell_tooltip_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // If tooltip is visible, we may want to hide it. If it is not, we are ok. 217 // If tooltip is visible, we may want to hide it. If it is not, we are ok.
218 if (tooltip_window_ == target && tooltip_->IsVisible()) 218 if (tooltip_window_ == target && tooltip_->IsVisible())
219 UpdateIfRequired(); 219 UpdateIfRequired();
220 } 220 }
221 221
222 bool ShellTooltipManager::PreHandleKeyEvent(aura::Window* target, 222 bool ShellTooltipManager::PreHandleKeyEvent(aura::Window* target,
223 aura::KeyEvent* event) { 223 aura::KeyEvent* event) {
224 return false; 224 return false;
225 } 225 }
226 226
227 bool ShellTooltipManager::PreHandleTranslatedKeyEvent(
228 aura::Window* target,
229 aura::TranslatedKeyEvent* event) {
230 return false;
231 }
232
227 bool ShellTooltipManager::PreHandleMouseEvent(aura::Window* target, 233 bool ShellTooltipManager::PreHandleMouseEvent(aura::Window* target,
228 aura::MouseEvent* event) { 234 aura::MouseEvent* event) {
229 switch (event->type()) { 235 switch (event->type()) {
230 case ui::ET_MOUSE_MOVED: 236 case ui::ET_MOUSE_MOVED:
231 if (tooltip_window_ != target) { 237 if (tooltip_window_ != target) {
232 if (tooltip_window_) 238 if (tooltip_window_)
233 tooltip_window_->RemoveObserver(this); 239 tooltip_window_->RemoveObserver(this);
234 tooltip_window_ = target; 240 tooltip_window_ = target;
235 tooltip_window_->AddObserver(this); 241 tooltip_window_->AddObserver(this);
236 } 242 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 string16 tooltip_text(tooltip_text_); 294 string16 tooltip_text(tooltip_text_);
289 gfx::Point widget_loc = curr_mouse_loc_; 295 gfx::Point widget_loc = curr_mouse_loc_;
290 widget_loc = widget_loc.Add(tooltip_window_->GetScreenBounds().origin()); 296 widget_loc = widget_loc.Add(tooltip_window_->GetScreenBounds().origin());
291 tooltip_->SetText(tooltip_text, widget_loc); 297 tooltip_->SetText(tooltip_text, widget_loc);
292 tooltip_->Show(); 298 tooltip_->Show();
293 } 299 }
294 } 300 }
295 } 301 }
296 302
297 } // namespace aura_shell 303 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698