| 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 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4463 | 4463 |
| 4464 WebPageSerializer::serialize(webview()->mainFrame(), true, this, weburl_links, | 4464 WebPageSerializer::serialize(webview()->mainFrame(), true, this, weburl_links, |
| 4465 webstring_paths, | 4465 webstring_paths, |
| 4466 webkit_glue::FilePathToWebString( | 4466 webkit_glue::FilePathToWebString( |
| 4467 local_directory_name)); | 4467 local_directory_name)); |
| 4468 } | 4468 } |
| 4469 | 4469 |
| 4470 void RenderViewImpl::OnShouldClose() { | 4470 void RenderViewImpl::OnShouldClose() { |
| 4471 base::TimeTicks before_unload_start_time = base::TimeTicks::Now(); | 4471 base::TimeTicks before_unload_start_time = base::TimeTicks::Now(); |
| 4472 bool should_close = webview()->dispatchBeforeUnloadEvent(); | 4472 bool should_close = webview()->dispatchBeforeUnloadEvent(); |
| 4473 if (should_close) |
| 4474 pepper_delegate_.OnDestruct(); |
| 4473 base::TimeTicks before_unload_end_time = base::TimeTicks::Now(); | 4475 base::TimeTicks before_unload_end_time = base::TimeTicks::Now(); |
| 4474 Send(new ViewHostMsg_ShouldClose_ACK(routing_id_, should_close, | 4476 Send(new ViewHostMsg_ShouldClose_ACK(routing_id_, should_close, |
| 4475 before_unload_start_time, | 4477 before_unload_start_time, |
| 4476 before_unload_end_time)); | 4478 before_unload_end_time)); |
| 4477 } | 4479 } |
| 4478 | 4480 |
| 4479 void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) { | 4481 void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) { |
| 4480 // Ensure that no other in-progress navigation continues. | 4482 // Ensure that no other in-progress navigation continues. |
| 4481 OnStop(); | 4483 OnStop(); |
| 4482 | 4484 |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5308 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5307 return !!RenderThreadImpl::current()->compositor_thread(); | 5309 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5308 } | 5310 } |
| 5309 | 5311 |
| 5310 void RenderViewImpl::OnJavaBridgeInit() { | 5312 void RenderViewImpl::OnJavaBridgeInit() { |
| 5311 DCHECK(!java_bridge_dispatcher_.get()); | 5313 DCHECK(!java_bridge_dispatcher_.get()); |
| 5312 #if defined(ENABLE_JAVA_BRIDGE) | 5314 #if defined(ENABLE_JAVA_BRIDGE) |
| 5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5315 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5314 #endif | 5316 #endif |
| 5315 } | 5317 } |
| OLD | NEW |