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

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

Issue 10960042: Add navigator.doNotTrack property (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « content/renderer/render_view_impl.h ('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 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "content/renderer/browser_plugin/browser_plugin.h" 62 #include "content/renderer/browser_plugin/browser_plugin.h"
63 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 63 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
64 #include "content/renderer/browser_plugin/old/old_browser_plugin.h" 64 #include "content/renderer/browser_plugin/old/old_browser_plugin.h"
65 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 65 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
66 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" 66 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h"
67 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" 67 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
68 #include "content/renderer/device_orientation_dispatcher.h" 68 #include "content/renderer/device_orientation_dispatcher.h"
69 #include "content/renderer/devtools_agent.h" 69 #include "content/renderer/devtools_agent.h"
70 #include "content/renderer/dom_automation_controller.h" 70 #include "content/renderer/dom_automation_controller.h"
71 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 71 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
72 #include "content/renderer/do_not_track_bindings.h"
72 #include "content/renderer/external_popup_menu.h" 73 #include "content/renderer/external_popup_menu.h"
73 #include "content/renderer/geolocation_dispatcher.h" 74 #include "content/renderer/geolocation_dispatcher.h"
74 #include "content/renderer/gpu/compositor_thread.h" 75 #include "content/renderer/gpu/compositor_thread.h"
75 #include "content/renderer/gpu/compositor_output_surface.h" 76 #include "content/renderer/gpu/compositor_output_surface.h"
76 #include "content/renderer/idle_user_detector.h" 77 #include "content/renderer/idle_user_detector.h"
77 #include "content/renderer/input_tag_speech_dispatcher.h" 78 #include "content/renderer/input_tag_speech_dispatcher.h"
78 #include "content/renderer/java/java_bridge_dispatcher.h" 79 #include "content/renderer/java/java_bridge_dispatcher.h"
79 #include "content/renderer/load_progress_tracker.h" 80 #include "content/renderer/load_progress_tracker.h"
80 #include "content/renderer/media/media_stream_dependency_factory.h" 81 #include "content/renderer/media/media_stream_dependency_factory.h"
81 #include "content/renderer/media/media_stream_dispatcher.h" 82 #include "content/renderer/media/media_stream_dispatcher.h"
(...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 3364
3364 if (enabled_bindings_ & content::BINDINGS_POLICY_DOM_AUTOMATION) { 3365 if (enabled_bindings_ & content::BINDINGS_POLICY_DOM_AUTOMATION) {
3365 if (!dom_automation_controller_.get()) 3366 if (!dom_automation_controller_.get())
3366 dom_automation_controller_.reset(new DomAutomationController()); 3367 dom_automation_controller_.reset(new DomAutomationController());
3367 dom_automation_controller_->set_message_sender( 3368 dom_automation_controller_->set_message_sender(
3368 static_cast<content::RenderView*>(this)); 3369 static_cast<content::RenderView*>(this));
3369 dom_automation_controller_->set_routing_id(routing_id()); 3370 dom_automation_controller_->set_routing_id(routing_id());
3370 dom_automation_controller_->BindToJavascript(frame, 3371 dom_automation_controller_->BindToJavascript(frame,
3371 "domAutomationController"); 3372 "domAutomationController");
3372 } 3373 }
3374
3375 content::InjectDoNotTrackBindings(frame);
3373 } 3376 }
3374 3377
3375 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { 3378 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) {
3376 // Notify the browser about non-blank documents loading in the top frame. 3379 // Notify the browser about non-blank documents loading in the top frame.
3377 GURL url = frame->document().url(); 3380 GURL url = frame->document().url();
3378 if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) { 3381 if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) {
3379 if (frame == webview()->mainFrame()) 3382 if (frame == webview()->mainFrame())
3380 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); 3383 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_));
3381 } 3384 }
3382 3385
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
6248 6251
6249 updating_frame_tree_ = true; 6252 updating_frame_tree_ = true;
6250 active_frame_id_map_.clear(); 6253 active_frame_id_map_.clear();
6251 6254
6252 target_process_id_ = process_id; 6255 target_process_id_ = process_id;
6253 target_routing_id_ = route_id; 6256 target_routing_id_ = route_id;
6254 CreateFrameTree(webview()->mainFrame(), frames); 6257 CreateFrameTree(webview()->mainFrame(), frames);
6255 6258
6256 updating_frame_tree_ = false; 6259 updating_frame_tree_ = false;
6257 } 6260 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698