| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 void RenderWidgetHostImpl::InitializeOverscrollController() { | 1337 void RenderWidgetHostImpl::InitializeOverscrollController() { |
| 1338 overscroll_controller_.reset(new OverscrollController(this)); | 1338 overscroll_controller_.reset(new OverscrollController(this)); |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 bool RenderWidgetHostImpl::IsInOverscrollGesture() const { | 1341 bool RenderWidgetHostImpl::IsInOverscrollGesture() const { |
| 1342 return overscroll_controller_.get() && | 1342 return overscroll_controller_.get() && |
| 1343 overscroll_controller_->overscroll_mode() != OVERSCROLL_NONE; | 1343 overscroll_controller_->overscroll_mode() != OVERSCROLL_NONE; |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 void RenderWidgetHostImpl::GetWebScreenInfo(WebKit::WebScreenInfo* result) { | 1346 void RenderWidgetHostImpl::GetWebScreenInfo(WebKit::WebScreenInfo* result) { |
| 1347 #if defined(OS_POSIX) || defined(USE_AURA) | |
| 1348 if (GetView()) { | 1347 if (GetView()) { |
| 1349 static_cast<RenderWidgetHostViewPort*>(GetView())->GetScreenInfo(result); | 1348 static_cast<RenderWidgetHostViewPort*>(GetView())->GetScreenInfo(result); |
| 1350 } else { | 1349 } else { |
| 1351 RenderWidgetHostViewPort::GetDefaultScreenInfo(result); | 1350 RenderWidgetHostViewPort::GetDefaultScreenInfo(result); |
| 1352 } | 1351 } |
| 1353 #else | |
| 1354 *result = WebKit::WebScreenInfoFactory::screenInfo( | |
| 1355 gfx::NativeViewFromId(GetNativeViewId())); | |
| 1356 #endif | |
| 1357 } | 1352 } |
| 1358 | 1353 |
| 1359 void RenderWidgetHostImpl::Destroy() { | 1354 void RenderWidgetHostImpl::Destroy() { |
| 1360 NotificationService::current()->Notify( | 1355 NotificationService::current()->Notify( |
| 1361 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1356 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 1362 Source<RenderWidgetHost>(this), | 1357 Source<RenderWidgetHost>(this), |
| 1363 NotificationService::NoDetails()); | 1358 NotificationService::NoDetails()); |
| 1364 | 1359 |
| 1365 // Tell the view to die. | 1360 // Tell the view to die. |
| 1366 // Note that in the process of the view shutting down, it can call a ton | 1361 // Note that in the process of the view shutting down, it can call a ton |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 return; | 2357 return; |
| 2363 | 2358 |
| 2364 OnRenderAutoResized(new_size); | 2359 OnRenderAutoResized(new_size); |
| 2365 } | 2360 } |
| 2366 | 2361 |
| 2367 void RenderWidgetHostImpl::DetachDelegate() { | 2362 void RenderWidgetHostImpl::DetachDelegate() { |
| 2368 delegate_ = NULL; | 2363 delegate_ = NULL; |
| 2369 } | 2364 } |
| 2370 | 2365 |
| 2371 } // namespace content | 2366 } // namespace content |
| OLD | NEW |