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

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

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Track independent bounds as native window property not member of widget class Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 gfx::NativeWindow ChildModalParent::GetChild() const { 142 gfx::NativeWindow ChildModalParent::GetChild() const {
143 if (child_) 143 if (child_)
144 return child_->GetNativeView(); 144 return child_->GetNativeView();
145 return NULL; 145 return NULL;
146 } 146 }
147 147
148 Widget* ChildModalParent::CreateChild() { 148 Widget* ChildModalParent::CreateChild() {
149 Widget* child = Widget::CreateWindowWithParent(new ChildModalWindow, 149 Widget* child = Widget::CreateWindowWithParent(new ChildModalWindow,
150 GetWidget()->GetNativeView()); 150 GetWidget()->GetNativeView());
151 wm::SetModalParent(child->GetNativeView(), GetModalParent()); 151 wm::SetModalParent(child->GetNativeView(), GetModalParent(), NULL, NULL);
152 child->AddObserver(this); 152 child->AddObserver(this);
153 child->GetNativeView()->SetName("ChildModalWindow"); 153 child->GetNativeView()->SetName("ChildModalWindow");
154 return child; 154 return child;
155 } 155 }
156 156
157 views::View* ChildModalParent::GetContentsView() { 157 views::View* ChildModalParent::GetContentsView() {
158 return this; 158 return this;
159 } 159 }
160 160
161 base::string16 ChildModalParent::GetWindowTitle() const { 161 base::string16 ChildModalParent::GetWindowTitle() const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 void ChildModalParent::OnWidgetDestroying(Widget* widget) { 208 void ChildModalParent::OnWidgetDestroying(Widget* widget) {
209 if (child_) { 209 if (child_) {
210 DCHECK_EQ(child_, widget); 210 DCHECK_EQ(child_, widget);
211 child_ = NULL; 211 child_ = NULL;
212 } 212 }
213 } 213 }
214 214
215 } // namespace test 215 } // namespace test
216 } // namespace ash 216 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/resize_handle_window_targeter.cc » ('j') | components/constrained_window/constrained_window_views.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698