| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/renderer/render_view.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 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2821 void RenderView::didAdoptURLLoader(WebKit::WebURLLoader* loader) { | 2821 void RenderView::didAdoptURLLoader(WebKit::WebURLLoader* loader) { |
| 2822 webkit_glue::WebURLLoaderImpl* loader_impl = | 2822 webkit_glue::WebURLLoaderImpl* loader_impl = |
| 2823 static_cast<webkit_glue::WebURLLoaderImpl*>(loader); | 2823 static_cast<webkit_glue::WebURLLoaderImpl*>(loader); |
| 2824 loader_impl->UpdateRoutingId(routing_id_); | 2824 loader_impl->UpdateRoutingId(routing_id_); |
| 2825 } | 2825 } |
| 2826 | 2826 |
| 2827 void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) { | 2827 void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) { |
| 2828 Send(new ViewHostMsg_JSOutOfMemory(routing_id_)); | 2828 Send(new ViewHostMsg_JSOutOfMemory(routing_id_)); |
| 2829 } | 2829 } |
| 2830 | 2830 |
| 2831 void RenderView::didCreateScriptContext(WebFrame* frame) { | 2831 void RenderView::didCreateScriptContext(WebFrame* frame, |
| 2832 content::GetContentClient()->renderer()->DidCreateScriptContext(frame); | 2832 v8::Handle<v8::Context> context, |
| 2833 int world_id) { |
| 2834 content::GetContentClient()->renderer()->DidCreateScriptContext( |
| 2835 frame, context, world_id); |
| 2833 } | 2836 } |
| 2834 | 2837 |
| 2835 void RenderView::didDestroyScriptContext(WebFrame* frame) { | 2838 void RenderView::willReleaseScriptContext(WebFrame* frame, |
| 2836 content::GetContentClient()->renderer()->DidDestroyScriptContext(frame); | 2839 v8::Handle<v8::Context> context, |
| 2837 } | 2840 int world_id) { |
| 2838 | 2841 content::GetContentClient()->renderer()->WillReleaseScriptContext( |
| 2839 void RenderView::didCreateIsolatedScriptContext( | 2842 frame, context, world_id); |
| 2840 WebFrame* frame, int world_id, v8::Handle<v8::Context> context) { | |
| 2841 content::GetContentClient()->renderer()->DidCreateIsolatedScriptContext( | |
| 2842 frame, world_id, context); | |
| 2843 } | 2843 } |
| 2844 | 2844 |
| 2845 void RenderView::didUpdateLayout(WebFrame* frame) { | 2845 void RenderView::didUpdateLayout(WebFrame* frame) { |
| 2846 // We don't always want to set up a timer, only if we've been put in that | 2846 // We don't always want to set up a timer, only if we've been put in that |
| 2847 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| | 2847 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| |
| 2848 // message. | 2848 // message. |
| 2849 if (!send_preferred_size_changes_ || !webview()) | 2849 if (!send_preferred_size_changes_ || !webview()) |
| 2850 return; | 2850 return; |
| 2851 | 2851 |
| 2852 if (check_preferred_size_timer_.IsRunning()) | 2852 if (check_preferred_size_timer_.IsRunning()) |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4607 } | 4607 } |
| 4608 | 4608 |
| 4609 void RenderView::OnEnableViewSourceMode() { | 4609 void RenderView::OnEnableViewSourceMode() { |
| 4610 if (!webview()) | 4610 if (!webview()) |
| 4611 return; | 4611 return; |
| 4612 WebFrame* main_frame = webview()->mainFrame(); | 4612 WebFrame* main_frame = webview()->mainFrame(); |
| 4613 if (!main_frame) | 4613 if (!main_frame) |
| 4614 return; | 4614 return; |
| 4615 main_frame->enableViewSourceMode(true); | 4615 main_frame->enableViewSourceMode(true); |
| 4616 } | 4616 } |
| OLD | NEW |