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 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 | 2840 |
2841 void RenderView::didDestroyScriptContext(WebFrame* frame) { | 2841 void RenderView::didDestroyScriptContext(WebFrame* frame) { |
2842 content::GetContentClient()->renderer()->DidDestroyScriptContext(frame); | 2842 content::GetContentClient()->renderer()->DidDestroyScriptContext(frame); |
2843 } | 2843 } |
2844 | 2844 |
2845 void RenderView::didCreateIsolatedScriptContext(WebFrame* frame) { | 2845 void RenderView::didCreateIsolatedScriptContext(WebFrame* frame) { |
2846 content::GetContentClient()->renderer()->DidCreateIsolatedScriptContext( | 2846 content::GetContentClient()->renderer()->DidCreateIsolatedScriptContext( |
2847 frame); | 2847 frame); |
2848 } | 2848 } |
2849 | 2849 |
2850 void RenderView::logCrossFramePropertyAccess(WebFrame* frame, | |
2851 WebFrame* target, | |
2852 bool cross_origin, | |
2853 const WebString& property_name, | |
2854 unsigned long long event_id) { | |
2855 FOR_EACH_OBSERVER( | |
2856 RenderViewObserver, | |
2857 observers_, | |
2858 LogCrossFramePropertyAccess( | |
2859 frame, target, cross_origin, property_name, event_id)); | |
2860 } | |
2861 | |
2862 void RenderView::didUpdateLayout(WebFrame* frame) { | 2850 void RenderView::didUpdateLayout(WebFrame* frame) { |
2863 // We don't always want to set up a timer, only if we've been put in that | 2851 // We don't always want to set up a timer, only if we've been put in that |
2864 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| | 2852 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| |
2865 // message. | 2853 // message. |
2866 if (!send_preferred_size_changes_ || !webview()) | 2854 if (!send_preferred_size_changes_ || !webview()) |
2867 return; | 2855 return; |
2868 | 2856 |
2869 if (check_preferred_size_timer_.IsRunning()) | 2857 if (check_preferred_size_timer_.IsRunning()) |
2870 return; | 2858 return; |
2871 check_preferred_size_timer_.Start(TimeDelta::FromMilliseconds(0), this, | 2859 check_preferred_size_timer_.Start(TimeDelta::FromMilliseconds(0), this, |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4547 } | 4535 } |
4548 #endif | 4536 #endif |
4549 | 4537 |
4550 void RenderView::OnContextMenuClosed( | 4538 void RenderView::OnContextMenuClosed( |
4551 const webkit_glue::CustomContextMenuContext& custom_context) { | 4539 const webkit_glue::CustomContextMenuContext& custom_context) { |
4552 if (custom_context.is_pepper_menu) | 4540 if (custom_context.is_pepper_menu) |
4553 pepper_delegate_.OnContextMenuClosed(custom_context); | 4541 pepper_delegate_.OnContextMenuClosed(custom_context); |
4554 else | 4542 else |
4555 context_menu_node_.reset(); | 4543 context_menu_node_.reset(); |
4556 } | 4544 } |
OLD | NEW |