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 "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" | 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 private: | 248 private: |
249 void EnableAutoResize() { | 249 void EnableAutoResize() { |
250 content::RenderViewHost* render_view_host = | 250 content::RenderViewHost* render_view_host = |
251 GetWebContents()->GetRenderViewHost(); | 251 GetWebContents()->GetRenderViewHost(); |
252 render_view_host->EnableAutoResize(min_size_, max_size_); | 252 render_view_host->EnableAutoResize(min_size_, max_size_); |
253 } | 253 } |
254 | 254 |
255 InitiatorWebContentsObserver initiator_observer_; | 255 InitiatorWebContentsObserver initiator_observer_; |
256 | 256 |
257 scoped_ptr<ConstrainedWebDialogDelegateViews> impl_; | 257 std::unique_ptr<ConstrainedWebDialogDelegateViews> impl_; |
258 | 258 |
259 // Minimum and maximum sizes to determine dialog bounds for auto-resizing. | 259 // Minimum and maximum sizes to determine dialog bounds for auto-resizing. |
260 const gfx::Size min_size_; | 260 const gfx::Size min_size_; |
261 const gfx::Size max_size_; | 261 const gfx::Size max_size_; |
262 | 262 |
263 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewViews); | 263 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewViews); |
264 }; | 264 }; |
265 | 265 |
266 } // namespace | 266 } // namespace |
267 | 267 |
(...skipping 17 matching lines...) Expand all Loading... |
285 const gfx::Size& max_size) { | 285 const gfx::Size& max_size) { |
286 DCHECK(!min_size.IsEmpty()); | 286 DCHECK(!min_size.IsEmpty()); |
287 DCHECK(!max_size.IsEmpty()); | 287 DCHECK(!max_size.IsEmpty()); |
288 ConstrainedWebDialogDelegateViewViews* dialog = | 288 ConstrainedWebDialogDelegateViewViews* dialog = |
289 new ConstrainedWebDialogDelegateViewViews( | 289 new ConstrainedWebDialogDelegateViewViews( |
290 browser_context, delegate, web_contents, | 290 browser_context, delegate, web_contents, |
291 min_size, max_size); | 291 min_size, max_size); |
292 constrained_window::CreateWebModalDialogViews(dialog, web_contents); | 292 constrained_window::CreateWebModalDialogViews(dialog, web_contents); |
293 return dialog; | 293 return dialog; |
294 } | 294 } |
OLD | NEW |