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 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 // Clear the new_auto_size_ since the empty value is used as a flag to | 1974 // Clear the new_auto_size_ since the empty value is used as a flag to |
1975 // indicate that no callback is in progress (i.e. without this line | 1975 // indicate that no callback is in progress (i.e. without this line |
1976 // DelayedAutoResized will not get called again). | 1976 // DelayedAutoResized will not get called again). |
1977 new_auto_size_.SetSize(0, 0); | 1977 new_auto_size_.SetSize(0, 0); |
1978 if (!auto_resize_enabled_) | 1978 if (!auto_resize_enabled_) |
1979 return; | 1979 return; |
1980 | 1980 |
1981 OnRenderAutoResized(new_size); | 1981 OnRenderAutoResized(new_size); |
1982 } | 1982 } |
1983 | 1983 |
| 1984 RenderWidgetHostDelegate* RenderWidgetHostImpl::GetDelegate() { |
| 1985 return delegate_; |
| 1986 } |
| 1987 |
1984 void RenderWidgetHostImpl::DetachDelegate() { | 1988 void RenderWidgetHostImpl::DetachDelegate() { |
1985 delegate_ = NULL; | 1989 delegate_ = NULL; |
1986 } | 1990 } |
1987 | 1991 |
1988 void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) { | 1992 void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) { |
1989 ui::LatencyInfo::LatencyComponent window_snapshot_component; | 1993 ui::LatencyInfo::LatencyComponent window_snapshot_component; |
1990 if (latency_info.FindLatency(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, | 1994 if (latency_info.FindLatency(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, |
1991 GetLatencyComponentId(), | 1995 GetLatencyComponentId(), |
1992 &window_snapshot_component)) { | 1996 &window_snapshot_component)) { |
1993 int sequence_number = static_cast<int>( | 1997 int sequence_number = static_cast<int>( |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 } | 2110 } |
2107 | 2111 |
2108 #if defined(OS_WIN) | 2112 #if defined(OS_WIN) |
2109 gfx::NativeViewAccessible | 2113 gfx::NativeViewAccessible |
2110 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2114 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
2111 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2115 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
2112 } | 2116 } |
2113 #endif | 2117 #endif |
2114 | 2118 |
2115 } // namespace content | 2119 } // namespace content |
OLD | NEW |