Chromium Code Reviews| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 932 new TextInputClientObserver(this); | 932 new TextInputClientObserver(this); |
| 933 #endif // defined(OS_MACOSX) | 933 #endif // defined(OS_MACOSX) |
| 934 | 934 |
| 935 #if defined(OS_ANDROID) | 935 #if defined(OS_ANDROID) |
| 936 media_player_manager_.reset(new RendererMediaPlayerManager()); | 936 media_player_manager_.reset(new RendererMediaPlayerManager()); |
| 937 #endif | 937 #endif |
| 938 | 938 |
| 939 // The next group of objects all implement RenderViewObserver, so are deleted | 939 // The next group of objects all implement RenderViewObserver, so are deleted |
| 940 // along with the RenderView automatically. | 940 // along with the RenderView automatically. |
| 941 devtools_agent_ = new DevToolsAgent(this); | 941 devtools_agent_ = new DevToolsAgent(this); |
| 942 if (RenderWidgetCompositor* rwc = compositor()) { | |
| 943 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | |
|
jamesr
2013/07/22 18:01:02
hmm, why is this grabbing the devtools agent via t
caseq
2013/07/22 18:56:47
Yes, it's different: webview() returns WebKit::Web
| |
| 944 } | |
| 942 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); | 945 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); |
| 943 | |
| 944 new ImageLoadingHelper(this); | 946 new ImageLoadingHelper(this); |
| 945 | 947 |
| 946 // Create renderer_accessibility_ if needed. | 948 // Create renderer_accessibility_ if needed. |
| 947 OnSetAccessibilityMode(params->accessibility_mode); | 949 OnSetAccessibilityMode(params->accessibility_mode); |
| 948 | 950 |
| 949 new IdleUserDetector(this); | 951 new IdleUserDetector(this); |
| 950 | 952 |
| 951 if (command_line.HasSwitch(switches::kDomAutomationController)) | 953 if (command_line.HasSwitch(switches::kDomAutomationController)) |
| 952 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 954 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
| 953 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 955 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
| (...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2808 } | 2810 } |
| 2809 | 2811 |
| 2810 void RenderViewImpl::didHandleGestureEvent( | 2812 void RenderViewImpl::didHandleGestureEvent( |
| 2811 const WebGestureEvent& event, | 2813 const WebGestureEvent& event, |
| 2812 bool event_cancelled) { | 2814 bool event_cancelled) { |
| 2813 RenderWidget::didHandleGestureEvent(event, event_cancelled); | 2815 RenderWidget::didHandleGestureEvent(event, event_cancelled); |
| 2814 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 2816 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 2815 DidHandleGestureEvent(event)); | 2817 DidHandleGestureEvent(event)); |
| 2816 } | 2818 } |
| 2817 | 2819 |
| 2820 void RenderViewImpl::initializeLayerTreeView() { | |
| 2821 RenderWidget::initializeLayerTreeView(); | |
| 2822 RenderWidgetCompositor* rwc = compositor(); | |
| 2823 if (!rwc || !webview() || !webview()->devToolsAgent()) | |
| 2824 return; | |
| 2825 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | |
| 2826 } | |
| 2827 | |
| 2818 // WebKit::WebFrameClient ----------------------------------------------------- | 2828 // WebKit::WebFrameClient ----------------------------------------------------- |
| 2819 | 2829 |
| 2820 WebKit::WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2830 WebKit::WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
| 2821 const WebPluginParams& params) { | 2831 const WebPluginParams& params) { |
| 2822 WebKit::WebPlugin* plugin = NULL; | 2832 WebKit::WebPlugin* plugin = NULL; |
| 2823 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 2833 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
| 2824 this, frame, params, &plugin)) { | 2834 this, frame, params, &plugin)) { |
| 2825 return plugin; | 2835 return plugin; |
| 2826 } | 2836 } |
| 2827 | 2837 |
| (...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6739 WebURL url = icon_urls[i].iconURL(); | 6749 WebURL url = icon_urls[i].iconURL(); |
| 6740 if (!url.isEmpty()) | 6750 if (!url.isEmpty()) |
| 6741 urls.push_back(FaviconURL(url, | 6751 urls.push_back(FaviconURL(url, |
| 6742 ToFaviconType(icon_urls[i].iconType()))); | 6752 ToFaviconType(icon_urls[i].iconType()))); |
| 6743 } | 6753 } |
| 6744 SendUpdateFaviconURL(urls); | 6754 SendUpdateFaviconURL(urls); |
| 6745 } | 6755 } |
| 6746 | 6756 |
| 6747 | 6757 |
| 6748 } // namespace content | 6758 } // namespace content |
| OLD | NEW |