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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4355 } | 4355 } |
4356 | 4356 |
4357 void RenderViewImpl::OnMoveOrResizeStarted() { | 4357 void RenderViewImpl::OnMoveOrResizeStarted() { |
4358 if (webview()) | 4358 if (webview()) |
4359 webview()->hidePopups(); | 4359 webview()->hidePopups(); |
4360 } | 4360 } |
4361 | 4361 |
4362 void RenderViewImpl::OnResize(const gfx::Size& new_size, | 4362 void RenderViewImpl::OnResize(const gfx::Size& new_size, |
4363 const gfx::Rect& resizer_rect, | 4363 const gfx::Rect& resizer_rect, |
4364 bool is_fullscreen) { | 4364 bool is_fullscreen) { |
4365 content::GetContentClient()->renderer()->RenderViewResized( | |
darin (slow to review)
2012/02/15 06:13:23
this is really a "before"-resize event. notice ho
Fady Samuel
2012/02/15 17:46:05
For the purposes of the layout fallback width yes,
| |
4366 this, new_size.width(), new_size.height()); | |
4365 if (webview()) { | 4367 if (webview()) { |
4366 webview()->hidePopups(); | 4368 webview()->hidePopups(); |
4367 if (send_preferred_size_changes_) { | 4369 if (send_preferred_size_changes_) { |
4368 webview()->mainFrame()->setCanHaveScrollbars( | 4370 webview()->mainFrame()->setCanHaveScrollbars( |
4369 ShouldDisplayScrollbars(new_size.width(), new_size.height())); | 4371 ShouldDisplayScrollbars(new_size.width(), new_size.height())); |
4370 } | 4372 } |
4371 UpdateScrollState(webview()->mainFrame()); | 4373 UpdateScrollState(webview()->mainFrame()); |
4372 } | 4374 } |
4373 | 4375 |
4374 RenderWidget::OnResize(new_size, resizer_rect, is_fullscreen); | 4376 RenderWidget::OnResize(new_size, resizer_rect, is_fullscreen); |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5041 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5043 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5042 return !!RenderThreadImpl::current()->compositor_thread(); | 5044 return !!RenderThreadImpl::current()->compositor_thread(); |
5043 } | 5045 } |
5044 | 5046 |
5045 void RenderViewImpl::OnJavaBridgeInit() { | 5047 void RenderViewImpl::OnJavaBridgeInit() { |
5046 DCHECK(!java_bridge_dispatcher_.get()); | 5048 DCHECK(!java_bridge_dispatcher_.get()); |
5047 #if defined(ENABLE_JAVA_BRIDGE) | 5049 #if defined(ENABLE_JAVA_BRIDGE) |
5048 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5050 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5049 #endif | 5051 #endif |
5050 } | 5052 } |
OLD | NEW |