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

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

Issue 2122873002: Add virtualKeyboardPrivate.onKeyboardClosed API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change OnKeyboardClosed as pure virtual method. Created 4 years, 5 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
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 KeyboardController::~KeyboardController() { 183 KeyboardController::~KeyboardController() {
184 if (container_) { 184 if (container_) {
185 if (container_->GetRootWindow()) 185 if (container_->GetRootWindow())
186 container_->GetRootWindow()->RemoveObserver(this); 186 container_->GetRootWindow()->RemoveObserver(this);
187 container_->RemoveObserver(this); 187 container_->RemoveObserver(this);
188 } 188 }
189 if (input_method_) 189 if (input_method_)
190 input_method_->RemoveObserver(this); 190 input_method_->RemoveObserver(this);
191 FOR_EACH_OBSERVER(KeyboardControllerObserver, observer_list_,
192 OnKeyboardClosed());
191 ui_->SetController(nullptr); 193 ui_->SetController(nullptr);
192 } 194 }
193 195
194 // static 196 // static
195 void KeyboardController::ResetInstance(KeyboardController* controller) { 197 void KeyboardController::ResetInstance(KeyboardController* controller) {
196 if (instance_ && instance_ != controller) 198 if (instance_ && instance_ != controller)
197 delete instance_; 199 delete instance_;
198 instance_ = controller; 200 instance_ = controller;
199 } 201 }
200 202
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // background during animation. 484 // background during animation.
483 NotifyKeyboardBoundsChanging(container_->bounds()); 485 NotifyKeyboardBoundsChanging(container_->bounds());
484 ui_->EnsureCaretInWorkArea(); 486 ui_->EnsureCaretInWorkArea();
485 } 487 }
486 488
487 void KeyboardController::HideAnimationFinished() { 489 void KeyboardController::HideAnimationFinished() {
488 ui_->HideKeyboardContainer(container_.get()); 490 ui_->HideKeyboardContainer(container_.get());
489 } 491 }
490 492
491 } // namespace keyboard 493 } // namespace keyboard
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698