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

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

Issue 1029033003: [DevTools] Only create DevToolsAgent for local main frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed review comment Created 5 years, 9 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 OnEnableAutoResize(params.min_size, params.max_size); 770 OnEnableAutoResize(params.min_size, params.max_size);
771 } 771 }
772 772
773 new MHTMLGenerator(this); 773 new MHTMLGenerator(this);
774 #if defined(OS_MACOSX) 774 #if defined(OS_MACOSX)
775 new TextInputClientObserver(this); 775 new TextInputClientObserver(this);
776 #endif // defined(OS_MACOSX) 776 #endif // defined(OS_MACOSX)
777 777
778 // The next group of objects all implement RenderViewObserver, so are deleted 778 // The next group of objects all implement RenderViewObserver, so are deleted
779 // along with the RenderView automatically. 779 // along with the RenderView automatically.
780 devtools_agent_ = new DevToolsAgent(main_render_frame_.get()); 780 if (!proxy) {
781 if (RenderWidgetCompositor* rwc = compositor()) { 781 devtools_agent_ = new DevToolsAgent(main_render_frame_.get());
782 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); 782 if (RenderWidgetCompositor* rwc = compositor())
783 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId());
783 } 784 }
785
784 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); 786 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this);
785 787
786 history_controller_.reset(new HistoryController(this)); 788 history_controller_.reset(new HistoryController(this));
787 789
788 new IdleUserDetector(this); 790 new IdleUserDetector(this);
789 791
790 if (command_line.HasSwitch(switches::kDomAutomationController)) 792 if (command_line.HasSwitch(switches::kDomAutomationController))
791 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; 793 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION;
792 if (command_line.HasSwitch(switches::kStatsCollectionController)) 794 if (command_line.HasSwitch(switches::kStatsCollectionController))
793 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; 795 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION;
(...skipping 3167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3961 std::vector<gfx::Size> sizes; 3963 std::vector<gfx::Size> sizes;
3962 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3964 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3963 if (!url.isEmpty()) 3965 if (!url.isEmpty())
3964 urls.push_back( 3966 urls.push_back(
3965 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3967 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3966 } 3968 }
3967 SendUpdateFaviconURL(urls); 3969 SendUpdateFaviconURL(urls);
3968 } 3970 }
3969 3971
3970 } // namespace content 3972 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698