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

Side by Side Diff: ui/views/test/child_modal_window.cc

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | « ui/views/examples/examples_main.cc ('k') | ui/views/test/test_views_delegate.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) 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/views/test/child_modal_window.h" 5 #include "ui/views/test/child_modal_window.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 gfx::NativeWindow ChildModalParent::GetChild() const { 144 gfx::NativeWindow ChildModalParent::GetChild() const {
145 if (child_) 145 if (child_)
146 return child_->GetNativeView(); 146 return child_->GetNativeView();
147 return NULL; 147 return NULL;
148 } 148 }
149 149
150 Widget* ChildModalParent::CreateChild() { 150 Widget* ChildModalParent::CreateChild() {
151 Widget* child = Widget::CreateWindowWithParent( 151 Widget* child = Widget::CreateWindowWithParent(
152 new ChildModalWindow, GetWidget()->GetNativeView()); 152 new ChildModalWindow, GetWidget()->GetNativeView());
153 corewm::SetModalParent(child->GetNativeView(), GetModalParent()); 153 wm::SetModalParent(child->GetNativeView(), GetModalParent());
154 child->AddObserver(this); 154 child->AddObserver(this);
155 child->GetNativeView()->SetName("ChildModalWindow"); 155 child->GetNativeView()->SetName("ChildModalWindow");
156 return child; 156 return child;
157 } 157 }
158 158
159 View* ChildModalParent::GetContentsView() { 159 View* ChildModalParent::GetContentsView() {
160 return this; 160 return this;
161 } 161 }
162 162
163 base::string16 ChildModalParent::GetWindowTitle() const { 163 base::string16 ChildModalParent::GetWindowTitle() const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 void ChildModalParent::OnWidgetDestroying(Widget* widget) { 210 void ChildModalParent::OnWidgetDestroying(Widget* widget) {
211 if (child_) { 211 if (child_) {
212 DCHECK_EQ(child_, widget); 212 DCHECK_EQ(child_, widget);
213 child_ = NULL; 213 child_ = NULL;
214 } 214 }
215 } 215 }
216 216
217 } // namespace test 217 } // namespace test
218 } // namespace views 218 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/examples_main.cc ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698