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

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

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 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_unittest.cc ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('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 "base/command_line.h" 8 #include "base/command_line.h"
9 #include "ui/aura/layout_manager.h" 9 #include "ui/aura/layout_manager.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (input_method_) 161 if (input_method_)
162 input_method_->RemoveObserver(this); 162 input_method_->RemoveObserver(this);
163 } 163 }
164 164
165 aura::Window* KeyboardController::GetContainerWindow() { 165 aura::Window* KeyboardController::GetContainerWindow() {
166 if (!container_.get()) { 166 if (!container_.get()) {
167 container_.reset(new aura::Window( 167 container_.reset(new aura::Window(
168 new KeyboardWindowDelegate(proxy_.get()))); 168 new KeyboardWindowDelegate(proxy_.get())));
169 container_->SetName("KeyboardContainer"); 169 container_->SetName("KeyboardContainer");
170 container_->set_owned_by_parent(false); 170 container_->set_owned_by_parent(false);
171 container_->Init(ui::LAYER_NOT_DRAWN); 171 container_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
172 container_->AddObserver(this); 172 container_->AddObserver(this);
173 container_->SetLayoutManager(new KeyboardLayoutManager(this)); 173 container_->SetLayoutManager(new KeyboardLayoutManager(this));
174 } 174 }
175 return container_.get(); 175 return container_.get();
176 } 176 }
177 177
178 void KeyboardController::NotifyKeyboardBoundsChanging( 178 void KeyboardController::NotifyKeyboardBoundsChanging(
179 const gfx::Rect& new_bounds) { 179 const gfx::Rect& new_bounds) {
180 if (proxy_->GetKeyboardWindow()->IsVisible()) { 180 if (proxy_->GetKeyboardWindow()->IsVisible()) {
181 FOR_EACH_OBSERVER(KeyboardControllerObserver, 181 FOR_EACH_OBSERVER(KeyboardControllerObserver,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const ui::InputMethod* input_method) { 277 const ui::InputMethod* input_method) {
278 DCHECK_EQ(input_method_, input_method); 278 DCHECK_EQ(input_method_, input_method);
279 input_method_ = NULL; 279 input_method_ = NULL;
280 } 280 }
281 281
282 bool KeyboardController::WillHideKeyboard() const { 282 bool KeyboardController::WillHideKeyboard() const {
283 return weak_factory_.HasWeakPtrs(); 283 return weak_factory_.HasWeakPtrs();
284 } 284 }
285 285
286 } // namespace keyboard 286 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698