Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/keyboard/keyboard_controller.h" | 5 #include "ui/keyboard/keyboard_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "content/public/browser/render_widget_host.h" | 9 #include "content/public/browser/render_widget_host.h" |
| 10 #include "content/public/browser/render_widget_host_iterator.h" | 10 #include "content/public/browser/render_widget_host_iterator.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 virtual bool HasHitTestMask() const OVERRIDE { | 111 virtual bool HasHitTestMask() const OVERRIDE { |
| 112 return !proxy_ || proxy_->HasKeyboardWindow(); | 112 return !proxy_ || proxy_->HasKeyboardWindow(); |
| 113 } | 113 } |
| 114 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE { | 114 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE { |
| 115 if (proxy_ && !proxy_->HasKeyboardWindow()) | 115 if (proxy_ && !proxy_->HasKeyboardWindow()) |
| 116 return; | 116 return; |
| 117 gfx::Rect keyboard_bounds = proxy_ ? proxy_->GetKeyboardWindow()->bounds() : | 117 gfx::Rect keyboard_bounds = proxy_ ? proxy_->GetKeyboardWindow()->bounds() : |
| 118 keyboard::DefaultKeyboardBoundsFromWindowBounds(bounds_); | 118 keyboard::DefaultKeyboardBoundsFromWindowBounds(bounds_); |
| 119 mask->addRect(RectToSkRect(keyboard_bounds)); | 119 mask->addRect(RectToSkRect(keyboard_bounds)); |
| 120 } | 120 } |
| 121 virtual void OnLinkDisambiguationPopupRequested( | |
| 122 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) OVERRIDE {} | |
|
cpu_(ooo_6.6-7.5)
2014/07/20 01:54:06
what happens if the user starts typing, should we
luken
2014/07/21 18:01:29
The LDP eats keystrokes, but will close if the use
| |
| 121 | 123 |
| 122 gfx::Rect bounds_; | 124 gfx::Rect bounds_; |
| 123 keyboard::KeyboardControllerProxy* proxy_; | 125 keyboard::KeyboardControllerProxy* proxy_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); | 127 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 void ToggleTouchEventLogging(bool enable) { | 130 void ToggleTouchEventLogging(bool enable) { |
| 129 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
| 130 if (!base::SysInfo::IsRunningOnChromeOS()) | 132 if (!base::SysInfo::IsRunningOnChromeOS()) |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 546 | 548 |
| 547 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) { | 549 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) { |
| 548 aura::Window* target_window = GetFrameWindow(window); | 550 aura::Window* target_window = GetFrameWindow(window); |
| 549 if (target_window && | 551 if (target_window && |
| 550 target_window->HasObserver(window_bounds_observer_.get())) { | 552 target_window->HasObserver(window_bounds_observer_.get())) { |
| 551 target_window->RemoveObserver(window_bounds_observer_.get()); | 553 target_window->RemoveObserver(window_bounds_observer_.get()); |
| 552 } | 554 } |
| 553 } | 555 } |
| 554 | 556 |
| 555 } // namespace keyboard | 557 } // namespace keyboard |
| OLD | NEW |