| 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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 void RenderWidgetHostImpl::SetAutoResize(bool enable, | 1331 void RenderWidgetHostImpl::SetAutoResize(bool enable, |
| 1332 const gfx::Size& min_size, | 1332 const gfx::Size& min_size, |
| 1333 const gfx::Size& max_size) { | 1333 const gfx::Size& max_size) { |
| 1334 auto_resize_enabled_ = enable; | 1334 auto_resize_enabled_ = enable; |
| 1335 min_size_for_auto_resize_ = min_size; | 1335 min_size_for_auto_resize_ = min_size; |
| 1336 max_size_for_auto_resize_ = max_size; | 1336 max_size_for_auto_resize_ = max_size; |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 void RenderWidgetHostImpl::Cleanup() { | |
| 1340 if (view_) { | |
| 1341 view_->Destroy(); | |
| 1342 view_ = nullptr; | |
| 1343 } | |
| 1344 } | |
| 1345 | |
| 1346 void RenderWidgetHostImpl::Destroy() { | 1339 void RenderWidgetHostImpl::Destroy() { |
| 1347 NotificationService::current()->Notify( | 1340 NotificationService::current()->Notify( |
| 1348 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1341 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 1349 Source<RenderWidgetHost>(this), | 1342 Source<RenderWidgetHost>(this), |
| 1350 NotificationService::NoDetails()); | 1343 NotificationService::NoDetails()); |
| 1351 | 1344 |
| 1352 // Tell the view to die. | 1345 // Tell the view to die. |
| 1353 // Note that in the process of the view shutting down, it can call a ton | 1346 // Note that in the process of the view shutting down, it can call a ton |
| 1354 // of other messages on us. So if you do any other deinitialization here, | 1347 // of other messages on us. So if you do any other deinitialization here, |
| 1355 // do it after this call to view_->Destroy(). | 1348 // do it after this call to view_->Destroy(). |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 } | 2119 } |
| 2127 #endif | 2120 #endif |
| 2128 | 2121 |
| 2129 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2122 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2130 if (view_) | 2123 if (view_) |
| 2131 return view_->PreferredReadbackFormat(); | 2124 return view_->PreferredReadbackFormat(); |
| 2132 return kN32_SkColorType; | 2125 return kN32_SkColorType; |
| 2133 } | 2126 } |
| 2134 | 2127 |
| 2135 } // namespace content | 2128 } // namespace content |
| OLD | NEW |