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

Side by Side Diff: ash/test/child_modal_window.cc

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | « no previous file | ash/wm/activation_controller.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 "ash/test/child_modal_window.h" 5 #include "ash/test/child_modal_window.h"
6 6
7 #include "ash/wm/window_modality_controller.h" 7 #include "ash/wm/window_modality_controller.h"
8 #include "base/utf_string_conversions.h" // ASCIIToUTF16 8 #include "base/utf_string_conversions.h" // ASCIIToUTF16
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 gfx::NativeWindow ChildModalParent::GetChild() const { 141 gfx::NativeWindow ChildModalParent::GetChild() const {
142 if (child_) 142 if (child_)
143 return child_->GetNativeView(); 143 return child_->GetNativeView();
144 return NULL; 144 return NULL;
145 } 145 }
146 146
147 views::Widget* ChildModalParent::CreateChild() { 147 views::Widget* ChildModalParent::CreateChild() {
148 views::Widget* child = views::Widget::CreateWindowWithParent( 148 views::Widget* child = views::Widget::CreateWindowWithParent(
149 new ChildModalWindow, GetWidget()->GetNativeView()); 149 new ChildModalWindow, GetWidget()->GetNativeView());
150 ash::wm::SetModalParent(child->GetNativeView(), GetModalParent()); 150 ash::SetModalParent(child->GetNativeView(), GetModalParent());
151 child->AddObserver(this); 151 child->AddObserver(this);
152 child->GetNativeView()->SetName("ChildModalWindow"); 152 child->GetNativeView()->SetName("ChildModalWindow");
153 return child; 153 return child;
154 } 154 }
155 155
156 views::View* ChildModalParent::GetContentsView() { 156 views::View* ChildModalParent::GetContentsView() {
157 return this; 157 return this;
158 } 158 }
159 159
160 string16 ChildModalParent::GetWindowTitle() const { 160 string16 ChildModalParent::GetWindowTitle() const {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 void ChildModalParent::OnWidgetClosing(views::Widget* widget) { 206 void ChildModalParent::OnWidgetClosing(views::Widget* widget) {
207 if (child_) { 207 if (child_) {
208 DCHECK_EQ(child_, widget); 208 DCHECK_EQ(child_, widget);
209 child_ = NULL; 209 child_ = NULL;
210 } 210 }
211 } 211 }
212 212
213 } // namespace test 213 } // namespace test
214 } // namespace ash 214 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/activation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698