| 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 "ui/aura/layout_manager.h" | 8 #include "ui/aura/layout_manager.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/aura/window_delegate.h" | 10 #include "ui/aura/window_delegate.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {} | 64 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {} |
| 65 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} | 65 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} |
| 66 virtual void OnWindowDestroying() OVERRIDE {} | 66 virtual void OnWindowDestroying() OVERRIDE {} |
| 67 virtual void OnWindowDestroyed() OVERRIDE { delete this; } | 67 virtual void OnWindowDestroyed() OVERRIDE { delete this; } |
| 68 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {} | 68 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {} |
| 69 virtual bool HasHitTestMask() const OVERRIDE { return true; } | 69 virtual bool HasHitTestMask() const OVERRIDE { return true; } |
| 70 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE { | 70 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE { |
| 71 gfx::Rect keyboard_bounds = KeyboardBoundsFromWindowBounds(bounds_); | 71 gfx::Rect keyboard_bounds = KeyboardBoundsFromWindowBounds(bounds_); |
| 72 mask->addRect(RectToSkRect(keyboard_bounds)); | 72 mask->addRect(RectToSkRect(keyboard_bounds)); |
| 73 } | 73 } |
| 74 virtual scoped_refptr<ui::Texture> CopyTexture() OVERRIDE { return NULL; } | 74 virtual void DidRecreateLayer(ui::Layer* old_layer, |
| 75 ui::Layer* new_layer) OVERRIDE {} |
| 75 | 76 |
| 76 gfx::Rect bounds_; | 77 gfx::Rect bounds_; |
| 77 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); | 78 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace | 81 } // namespace |
| 81 | 82 |
| 82 namespace keyboard { | 83 namespace keyboard { |
| 83 | 84 |
| 84 // LayoutManager for the virtual keyboard container. Manages a single window | 85 // LayoutManager for the virtual keyboard container. Manages a single window |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 observer_list_, | 224 observer_list_, |
| 224 OnKeyboardBoundsChanging(gfx::Rect())); | 225 OnKeyboardBoundsChanging(gfx::Rect())); |
| 225 proxy_->HideKeyboardContainer(container_); | 226 proxy_->HideKeyboardContainer(container_); |
| 226 } | 227 } |
| 227 | 228 |
| 228 bool KeyboardController::WillHideKeyboard() const { | 229 bool KeyboardController::WillHideKeyboard() const { |
| 229 return weak_factory_.HasWeakPtrs(); | 230 return weak_factory_.HasWeakPtrs(); |
| 230 } | 231 } |
| 231 | 232 |
| 232 } // namespace keyboard | 233 } // namespace keyboard |
| OLD | NEW |