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

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

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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
« 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 <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 275
276 aura::Window* KeyboardController::GetContainerWindow() { 276 aura::Window* KeyboardController::GetContainerWindow() {
277 if (!container_.get()) { 277 if (!container_.get()) {
278 container_.reset(new aura::Window( 278 container_.reset(new aura::Window(
279 new KeyboardWindowDelegate(proxy_.get()))); 279 new KeyboardWindowDelegate(proxy_.get())));
280 container_->SetEventTargeter(scoped_ptr<ui::EventTargeter>( 280 container_->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
281 new KeyboardContainerTargeter(container_.get(), proxy_.get()))); 281 new KeyboardContainerTargeter(container_.get(), proxy_.get())));
282 container_->SetName("KeyboardContainer"); 282 container_->SetName("KeyboardContainer");
283 container_->set_owned_by_parent(false); 283 container_->set_owned_by_parent(false);
284 container_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 284 container_->Init(ui::LAYER_NOT_DRAWN);
285 container_->AddObserver(this); 285 container_->AddObserver(this);
286 container_->SetLayoutManager(new KeyboardLayoutManager(this)); 286 container_->SetLayoutManager(new KeyboardLayoutManager(this));
287 } 287 }
288 return container_.get(); 288 return container_.get();
289 } 289 }
290 290
291 void KeyboardController::NotifyKeyboardBoundsChanging( 291 void KeyboardController::NotifyKeyboardBoundsChanging(
292 const gfx::Rect& new_bounds) { 292 const gfx::Rect& new_bounds) {
293 current_keyboard_bounds_ = new_bounds; 293 current_keyboard_bounds_ = new_bounds;
294 if (proxy_->HasKeyboardWindow() && proxy_->GetKeyboardWindow()->IsVisible()) { 294 if (proxy_->HasKeyboardWindow() && proxy_->GetKeyboardWindow()->IsVisible()) {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 proxy_->HideKeyboardContainer(container_.get()); 572 proxy_->HideKeyboardContainer(container_.get());
573 } 573 }
574 574
575 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) { 575 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) {
576 aura::Window* target_window = window ? window->GetToplevelWindow() : nullptr; 576 aura::Window* target_window = window ? window->GetToplevelWindow() : nullptr;
577 if (target_window) 577 if (target_window)
578 window_bounds_observer_->AddObservedWindow(target_window); 578 window_bounds_observer_->AddObservedWindow(target_window);
579 } 579 }
580 580
581 } // namespace keyboard 581 } // 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