Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 16848010: Add LayerTreeHostClient::{will,did}UpdateLayer, report layer updates to DevTools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased for try run Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 #endif // defined(OS_MACOSX) 938 #endif // defined(OS_MACOSX)
939 939
940 #if defined(OS_ANDROID) 940 #if defined(OS_ANDROID)
941 media_player_manager_.reset(new RendererMediaPlayerManager()); 941 media_player_manager_.reset(new RendererMediaPlayerManager());
942 #endif 942 #endif
943 943
944 // The next group of objects all implement RenderViewObserver, so are deleted 944 // The next group of objects all implement RenderViewObserver, so are deleted
945 // along with the RenderView automatically. 945 // along with the RenderView automatically.
946 devtools_agent_ = new DevToolsAgent(this); 946 devtools_agent_ = new DevToolsAgent(this);
947 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); 947 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this);
948 948 if (RenderWidgetCompositor* rwc = compositor()) {
jamesr 2013/07/19 19:47:47 this doesn't make sense - how could the compositor
949 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId());
950 }
949 new ImageLoadingHelper(this); 951 new ImageLoadingHelper(this);
950 952
951 // Create renderer_accessibility_ if needed. 953 // Create renderer_accessibility_ if needed.
952 OnSetAccessibilityMode(params->accessibility_mode); 954 OnSetAccessibilityMode(params->accessibility_mode);
953 955
954 new IdleUserDetector(this); 956 new IdleUserDetector(this);
955 957
956 if (command_line.HasSwitch(switches::kDomAutomationController)) 958 if (command_line.HasSwitch(switches::kDomAutomationController))
957 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; 959 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION;
958 if (command_line.HasSwitch(switches::kStatsCollectionController)) 960 if (command_line.HasSwitch(switches::kStatsCollectionController))
(...skipping 5415 matching lines...) Expand 10 before | Expand all | Expand 10 after
6374 return; 6376 return;
6375 if (!webview()->devToolsAgent()) 6377 if (!webview()->devToolsAgent())
6376 return; 6378 return;
6377 webview()->devToolsAgent()->willComposite(); 6379 webview()->devToolsAgent()->willComposite();
6378 } 6380 }
6379 6381
6380 bool RenderViewImpl::AllowPartialSwap() const { 6382 bool RenderViewImpl::AllowPartialSwap() const {
6381 return allow_partial_swap_; 6383 return allow_partial_swap_;
6382 } 6384 }
6383 6385
6386 void RenderViewImpl::initializeLayerTreeView() {
6387 RenderWidget::initializeLayerTreeView();
6388 RenderWidgetCompositor* rwc = compositor();
6389 if (!rwc || !webview() || !webview()->devToolsAgent())
6390 return;
6391 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId());
6392 }
6393
6384 #if defined(OS_WIN) 6394 #if defined(OS_WIN)
6385 void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) { 6395 void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) {
6386 if (focused) 6396 if (focused)
6387 focused_plugin_id_ = plugin_id; 6397 focused_plugin_id_ = plugin_id;
6388 else 6398 else
6389 focused_plugin_id_ = -1; 6399 focused_plugin_id_ = -1;
6390 } 6400 }
6391 #endif 6401 #endif
6392 6402
6393 #if defined(OS_MACOSX) 6403 #if defined(OS_MACOSX)
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
6817 WebURL url = icon_urls[i].iconURL(); 6827 WebURL url = icon_urls[i].iconURL();
6818 if (!url.isEmpty()) 6828 if (!url.isEmpty())
6819 urls.push_back(FaviconURL(url, 6829 urls.push_back(FaviconURL(url,
6820 ToFaviconType(icon_urls[i].iconType()))); 6830 ToFaviconType(icon_urls[i].iconType())));
6821 } 6831 }
6822 SendUpdateFaviconURL(urls); 6832 SendUpdateFaviconURL(urls);
6823 } 6833 }
6824 6834
6825 6835
6826 } // namespace content 6836 } // namespace content
OLDNEW
« content/renderer/render_view_impl.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698