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

Side by Side Diff: ui/views/widget/desktop_layout_manager.cc

Issue 11369220: Move the desktop aura classes into a desktop subdir to make the gyp simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/views/widget/desktop_layout_manager.h ('k') | ui/views/widget/desktop_native_widget_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/widget/desktop_layout_manager.h"
6
7 #include "ui/aura/root_window.h"
8 #include "ui/gfx/rect.h"
9
10 namespace views {
11
12 DesktopLayoutManager::DesktopLayoutManager(aura::RootWindow* root_window)
13 : root_window_(root_window),
14 main_window_(NULL) {
15 }
16
17 DesktopLayoutManager::~DesktopLayoutManager() {}
18
19 void DesktopLayoutManager::OnWindowResized() {
20 if (main_window_)
21 SetMainWindowSize();
22 }
23
24 void DesktopLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
25 if (!main_window_) {
26 main_window_ = child;
27
28 SetMainWindowSize();
29 }
30 }
31
32 void DesktopLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
33 if (main_window_ == child)
34 main_window_ = NULL;
35 }
36
37 void DesktopLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
38 }
39
40 void DesktopLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
41 bool visible) {
42 }
43
44 void DesktopLayoutManager::SetChildBounds(aura::Window* child,
45 const gfx::Rect& requested_bounds) {
46 if (main_window_ != child)
47 SetChildBoundsDirect(child, requested_bounds);
48 }
49
50 void DesktopLayoutManager::SetMainWindowSize() {
51 gfx::Rect bounds;
52 bounds.set_size(root_window_->GetHostSize());
53 SetChildBoundsDirect(main_window_, bounds);
54 }
55
56 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_layout_manager.h ('k') | ui/views/widget/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698