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

Side by Side Diff: ui/keyboard/keyboard_controller.cc

Issue 23444051: Move the content-dependent RecreateLayer logic from aura::Window to RWHVA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better comments Created 7 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
« no previous file with comments | « ui/aura/window_delegate.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('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) 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
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
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
OLDNEW
« no previous file with comments | « ui/aura/window_delegate.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698