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

Unified Diff: athena/common/fill_layout_manager.cc

Issue 335793005: athena: Add support for virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/common/fill_layout_manager.h ('k') | athena/main/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/common/fill_layout_manager.cc
diff --git a/athena/common/fill_layout_manager.cc b/athena/common/fill_layout_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aa5517be129479c5aa73970454a0bc88597cfe59
--- /dev/null
+++ b/athena/common/fill_layout_manager.cc
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "athena/common/fill_layout_manager.h"
+
+#include "base/logging.h"
+#include "ui/aura/window.h"
+
+namespace athena {
+
+FillLayoutManager::FillLayoutManager(aura::Window* container)
+ : container_(container) {
+ DCHECK(container_);
+}
+
+FillLayoutManager::~FillLayoutManager() {
+}
+
+void FillLayoutManager::OnWindowResized() {
+ gfx::Rect full_bounds = gfx::Rect(container_->bounds().size());
+ for (aura::Window::Windows::const_iterator iter =
+ container_->children().begin();
+ iter != container_->children().end();
+ ++iter) {
+ SetChildBoundsDirect(*iter, full_bounds);
+ }
+}
+
+void FillLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
+ SetChildBoundsDirect(child, (gfx::Rect(container_->bounds().size())));
+}
+
+void FillLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
+}
+void FillLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
+}
+void FillLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
+ bool visible) {
+}
+void FillLayoutManager::SetChildBounds(aura::Window* child,
+ const gfx::Rect& requested_bounds) {
+ // Ignore SetBounds request.
+}
+
+} // namespace athena
« no previous file with comments | « athena/common/fill_layout_manager.h ('k') | athena/main/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698