OLD | NEW |
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 <set> | 5 #include <set> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/platform_util.h" | 8 #include "chrome/browser/platform_util.h" |
9 #include "components/constrained_window/constrained_window_views.h" | 9 #include "components/constrained_window/constrained_window_views.h" |
10 #include "components/web_modal/single_web_contents_dialog_manager.h" | 10 #include "components/web_modal/single_web_contents_dialog_manager.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 view->parent()->ClearProperty(aura::client::kAnimationsDisabledKey); | 213 view->parent()->ClearProperty(aura::client::kAnimationsDisabledKey); |
214 #endif | 214 #endif |
215 widget->RemoveObserver(this); | 215 widget->RemoveObserver(this); |
216 observed_widgets_.erase(widget); | 216 observed_widgets_.erase(widget); |
217 | 217 |
218 #if defined(USE_AURA) | 218 #if defined(USE_AURA) |
219 shown_widgets_.erase(widget); | 219 shown_widgets_.erase(widget); |
220 #endif | 220 #endif |
221 | 221 |
222 // Will cause this object to be deleted. | 222 // Will cause this object to be deleted. |
223 native_delegate_->WillClose(widget->GetNativeView()); | 223 native_delegate_->WillClose(widget->GetNativeWindow()); |
224 } | 224 } |
225 | 225 |
226 SingleWebContentsDialogManagerDelegate* native_delegate_; | 226 SingleWebContentsDialogManagerDelegate* native_delegate_; |
227 NativeWebContentsModalDialog dialog_; | 227 NativeWebContentsModalDialog dialog_; |
228 WebContentsModalDialogHost* host_; | 228 WebContentsModalDialogHost* host_; |
229 std::set<views::Widget*> observed_widgets_; | 229 std::set<views::Widget*> observed_widgets_; |
230 std::set<views::Widget*> shown_widgets_; | 230 std::set<views::Widget*> shown_widgets_; |
231 | 231 |
232 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViews); | 232 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViews); |
233 }; | 233 }; |
234 | 234 |
235 } // namespace | 235 } // namespace |
236 | 236 |
237 namespace web_modal { | 237 namespace web_modal { |
238 | 238 |
239 SingleWebContentsDialogManager* WebContentsModalDialogManager:: | 239 SingleWebContentsDialogManager* WebContentsModalDialogManager:: |
240 CreateNativeWebModalManager( | 240 CreateNativeWebModalManager( |
241 NativeWebContentsModalDialog dialog, | 241 NativeWebContentsModalDialog dialog, |
242 SingleWebContentsDialogManagerDelegate* native_delegate) { | 242 SingleWebContentsDialogManagerDelegate* native_delegate) { |
243 return new NativeWebContentsModalDialogManagerViews(dialog, native_delegate); | 243 return new NativeWebContentsModalDialogManagerViews(dialog, native_delegate); |
244 } | 244 } |
245 | 245 |
246 } // namespace web_modal | 246 } // namespace web_modal |
OLD | NEW |