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

Side by Side Diff: ui/aura/test/test_windows.cc

Issue 10914231: Map fullscreen button to maximize (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix unit test Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 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 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/aura/test/test_windows.h" 5 #include "ui/aura/test/test_windows.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "ui/aura/client/aura_constants.h"
8 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
9 #include "ui/compositor/layer.h" 10 #include "ui/compositor/layer.h"
10 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
11 12
12 namespace aura { 13 namespace aura {
13 namespace test { 14 namespace test {
14 15
15 Window* CreateTestWindowWithId(int id, Window* parent) { 16 Window* CreateTestWindowWithId(int id, Window* parent) {
16 return CreateTestWindowWithDelegate(NULL, id, gfx::Rect(), parent); 17 return CreateTestWindowWithDelegate(NULL, id, gfx::Rect(), parent);
17 } 18 }
(...skipping 27 matching lines...) Expand all
45 int id, 46 int id,
46 const gfx::Rect& bounds, 47 const gfx::Rect& bounds,
47 Window* parent) { 48 Window* parent) {
48 Window* window = new Window(delegate); 49 Window* window = new Window(delegate);
49 window->set_id(id); 50 window->set_id(id);
50 window->SetType(type); 51 window->SetType(type);
51 window->Init(ui::LAYER_TEXTURED); 52 window->Init(ui::LAYER_TEXTURED);
52 window->SetBounds(bounds); 53 window->SetBounds(bounds);
53 window->Show(); 54 window->Show();
54 window->SetParent(parent); 55 window->SetParent(parent);
56 window->SetProperty(aura::client::kCanMaximizeKey, true);
55 return window; 57 return window;
56 } 58 }
57 59
58 Window* CreateTransientChild(int id, Window* parent) { 60 Window* CreateTransientChild(int id, Window* parent) {
59 Window* window = new Window(NULL); 61 Window* window = new Window(NULL);
60 window->set_id(id); 62 window->set_id(id);
61 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 63 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
62 window->Init(ui::LAYER_TEXTURED); 64 window->Init(ui::LAYER_TEXTURED);
63 window->SetParent(NULL); 65 window->SetParent(NULL);
64 parent->AddTransientChild(window); 66 parent->AddTransientChild(window);
(...skipping 26 matching lines...) Expand all
91 i != parent->children().end(); ++i) { 93 i != parent->children().end(); ++i) {
92 if (!result.empty()) 94 if (!result.empty())
93 result += " "; 95 result += " ";
94 result += base::IntToString((*i)->id()); 96 result += base::IntToString((*i)->id());
95 } 97 }
96 return result; 98 return result;
97 } 99 }
98 100
99 } // namespace test 101 } // namespace test
100 } // namespace aura 102 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698