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

Unified Diff: ash/shell/keyboard_controller_proxy_stub.cc

Issue 97013002: [Input View] Makes the input view window support window.resizeTo() and w3c visibility API its web c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell/keyboard_controller_proxy_stub.cc
diff --git a/ash/shell/keyboard_controller_proxy_stub.cc b/ash/shell/keyboard_controller_proxy_stub.cc
index 700c834365f02671dff6509ae3871363f809e74c..9ebe37b9ad8ac360bf4e1348d6b718c1a223acca 100644
--- a/ash/shell/keyboard_controller_proxy_stub.cc
+++ b/ash/shell/keyboard_controller_proxy_stub.cc
@@ -20,9 +20,11 @@ KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
}
aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
- aura::Window* window = new aura::Window(&delegate_);
- window->Init(ui::LAYER_NOT_DRAWN);
- return window;
+ if (!keyboard_) {
+ keyboard_.reset(new aura::Window(&delegate_));
+ keyboard_->Init(ui::LAYER_NOT_DRAWN);
+ }
+ return keyboard_.get();
}
BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {

Powered by Google App Engine
This is Rietveld 408576698