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

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

Issue 159473002: Restore screen work area after login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit and change HasKeyboardWindow to virtual function Created 6 years, 10 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 | « ash/shell/keyboard_controller_proxy_stub.cc ('k') | ui/keyboard/keyboard_controller_proxy.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 "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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 container_->set_owned_by_parent(false); 265 container_->set_owned_by_parent(false);
266 container_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 266 container_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
267 container_->AddObserver(this); 267 container_->AddObserver(this);
268 container_->SetLayoutManager(new KeyboardLayoutManager(this)); 268 container_->SetLayoutManager(new KeyboardLayoutManager(this));
269 } 269 }
270 return container_.get(); 270 return container_.get();
271 } 271 }
272 272
273 void KeyboardController::NotifyKeyboardBoundsChanging( 273 void KeyboardController::NotifyKeyboardBoundsChanging(
274 const gfx::Rect& new_bounds) { 274 const gfx::Rect& new_bounds) {
275 if (proxy_->GetKeyboardWindow()->IsVisible()) { 275 if (proxy_->HasKeyboardWindow() && proxy_->GetKeyboardWindow()->IsVisible()) {
276 FOR_EACH_OBSERVER(KeyboardControllerObserver, 276 FOR_EACH_OBSERVER(KeyboardControllerObserver,
277 observer_list_, 277 observer_list_,
278 OnKeyboardBoundsChanging(new_bounds)); 278 OnKeyboardBoundsChanging(new_bounds));
279 } 279 }
280 } 280 }
281 281
282 void KeyboardController::HideKeyboard(HideReason reason) { 282 void KeyboardController::HideKeyboard(HideReason reason) {
283 keyboard_visible_ = false; 283 keyboard_visible_ = false;
284 284
285 keyboard::LogKeyboardControlEvent( 285 keyboard::LogKeyboardControlEvent(
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // background during animation. 450 // background during animation.
451 NotifyKeyboardBoundsChanging(proxy_->GetKeyboardWindow()->bounds()); 451 NotifyKeyboardBoundsChanging(proxy_->GetKeyboardWindow()->bounds());
452 proxy_->EnsureCaretInWorkArea(); 452 proxy_->EnsureCaretInWorkArea();
453 } 453 }
454 454
455 void KeyboardController::HideAnimationFinished() { 455 void KeyboardController::HideAnimationFinished() {
456 proxy_->HideKeyboardContainer(container_.get()); 456 proxy_->HideKeyboardContainer(container_.get());
457 } 457 }
458 458
459 } // namespace keyboard 459 } // namespace keyboard
OLDNEW
« no previous file with comments | « ash/shell/keyboard_controller_proxy_stub.cc ('k') | ui/keyboard/keyboard_controller_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698