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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 6602039: P2P sockets IPC dispatcher for the renderer side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_view.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) 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 "chrome/renderer/render_view.h" 5 #include "chrome/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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "chrome/renderer/external_host_bindings.h" 68 #include "chrome/renderer/external_host_bindings.h"
69 #include "chrome/renderer/external_popup_menu.h" 69 #include "chrome/renderer/external_popup_menu.h"
70 #include "chrome/renderer/geolocation_dispatcher.h" 70 #include "chrome/renderer/geolocation_dispatcher.h"
71 #include "chrome/renderer/ggl/ggl.h" 71 #include "chrome/renderer/ggl/ggl.h"
72 #include "chrome/renderer/load_progress_tracker.h" 72 #include "chrome/renderer/load_progress_tracker.h"
73 #include "chrome/renderer/localized_error.h" 73 #include "chrome/renderer/localized_error.h"
74 #include "chrome/renderer/media/audio_renderer_impl.h" 74 #include "chrome/renderer/media/audio_renderer_impl.h"
75 #include "chrome/renderer/media/ipc_video_decoder.h" 75 #include "chrome/renderer/media/ipc_video_decoder.h"
76 #include "chrome/renderer/navigation_state.h" 76 #include "chrome/renderer/navigation_state.h"
77 #include "chrome/renderer/notification_provider.h" 77 #include "chrome/renderer/notification_provider.h"
78 #include "chrome/renderer/p2p/socket_dispatcher.h"
78 #include "chrome/renderer/page_click_tracker.h" 79 #include "chrome/renderer/page_click_tracker.h"
79 #include "chrome/renderer/page_load_histograms.h" 80 #include "chrome/renderer/page_load_histograms.h"
80 #include "chrome/renderer/plugin_channel_host.h" 81 #include "chrome/renderer/plugin_channel_host.h"
81 #include "chrome/renderer/print_web_view_helper.h" 82 #include "chrome/renderer/print_web_view_helper.h"
82 #include "chrome/renderer/render_process.h" 83 #include "chrome/renderer/render_process.h"
83 #include "chrome/renderer/render_thread.h" 84 #include "chrome/renderer/render_thread.h"
84 #include "chrome/renderer/render_view_observer.h" 85 #include "chrome/renderer/render_view_observer.h"
85 #include "chrome/renderer/render_view_visitor.h" 86 #include "chrome/renderer/render_view_visitor.h"
86 #include "chrome/renderer/render_widget_fullscreen.h" 87 #include "chrome/renderer/render_widget_fullscreen.h"
87 #include "chrome/renderer/render_widget_fullscreen_pepper.h" 88 #include "chrome/renderer/render_widget_fullscreen_pepper.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 ALLOW_THIS_IN_INITIALIZER_LIST(accessibility_method_factory_(this)), 583 ALLOW_THIS_IN_INITIALIZER_LIST(accessibility_method_factory_(this)),
583 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)), 584 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)),
584 devtools_client_(NULL), 585 devtools_client_(NULL),
585 geolocation_dispatcher_(NULL), 586 geolocation_dispatcher_(NULL),
586 speech_input_dispatcher_(NULL), 587 speech_input_dispatcher_(NULL),
587 device_orientation_dispatcher_(NULL), 588 device_orientation_dispatcher_(NULL),
588 print_helper_(NULL), 589 print_helper_(NULL),
589 searchbox_(NULL), 590 searchbox_(NULL),
590 spellcheck_provider_(NULL), 591 spellcheck_provider_(NULL),
591 accessibility_ack_pending_(false), 592 accessibility_ack_pending_(false),
593 p2p_socket_dispatcher_(NULL),
592 pending_app_icon_requests_(0), 594 pending_app_icon_requests_(0),
593 session_storage_namespace_id_(session_storage_namespace_id) { 595 session_storage_namespace_id_(session_storage_namespace_id) {
594 #if defined(OS_MACOSX) 596 #if defined(OS_MACOSX)
595 // On Mac, the select popups are rendered by the browser. 597 // On Mac, the select popups are rendered by the browser.
596 // Note that we don't do this in RenderMain otherwise this would not be called 598 // Note that we don't do this in RenderMain otherwise this would not be called
597 // in single-process mode. 599 // in single-process mode.
598 WebKit::WebView::setUseExternalPopupMenus(true); 600 WebKit::WebView::setUseExternalPopupMenus(true);
599 #endif 601 #endif
600 602
601 ClearBlockedContentSettings(); 603 ClearBlockedContentSettings();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 page_click_tracker->AddListener(autofill_agent); 666 page_click_tracker->AddListener(autofill_agent);
665 new TranslateHelper(this); 667 new TranslateHelper(this);
666 print_helper_ = new PrintWebViewHelper(this); 668 print_helper_ = new PrintWebViewHelper(this);
667 searchbox_ = new SearchBox(this); 669 searchbox_ = new SearchBox(this);
668 670
669 RenderThread* current_thread = RenderThread::current(); 671 RenderThread* current_thread = RenderThread::current();
670 SpellCheck* spellcheck = current_thread ? current_thread->spellchecker() : 0; 672 SpellCheck* spellcheck = current_thread ? current_thread->spellchecker() : 0;
671 spellcheck_provider_ = new SpellCheckProvider(this, spellcheck); 673 spellcheck_provider_ = new SpellCheckProvider(this, spellcheck);
672 674
673 if (CommandLine::ForCurrentProcess()->HasSwitch( 675 if (CommandLine::ForCurrentProcess()->HasSwitch(
676 switches::kEnableP2PApi)) {
677 p2p_socket_dispatcher_ = new P2PSocketDispatcher(this);
678 }
679
680 if (CommandLine::ForCurrentProcess()->HasSwitch(
674 switches::kEnableClientSidePhishingDetection)) { 681 switches::kEnableClientSidePhishingDetection)) {
675 new safe_browsing::PhishingClassifierDelegate(this, NULL); 682 new safe_browsing::PhishingClassifierDelegate(this, NULL);
676 } 683 }
677 684
678 // Observer for Malware DOM details messages. 685 // Observer for Malware DOM details messages.
679 new safe_browsing::MalwareDOMDetails(this); 686 new safe_browsing::MalwareDOMDetails(this);
680 } 687 }
681 688
682 RenderView::~RenderView() { 689 RenderView::~RenderView() {
683 if (decrement_shared_popup_at_destruction_) 690 if (decrement_shared_popup_at_destruction_)
(...skipping 5013 matching lines...) Expand 10 before | Expand all | Expand 10 after
5697 } 5704 }
5698 } 5705 }
5699 5706
5700 void RenderView::OnContextMenuClosed( 5707 void RenderView::OnContextMenuClosed(
5701 const webkit_glue::CustomContextMenuContext& custom_context) { 5708 const webkit_glue::CustomContextMenuContext& custom_context) {
5702 if (custom_context.is_pepper_menu) 5709 if (custom_context.is_pepper_menu)
5703 pepper_delegate_.OnContextMenuClosed(custom_context); 5710 pepper_delegate_.OnContextMenuClosed(custom_context);
5704 else 5711 else
5705 context_menu_node_.reset(); 5712 context_menu_node_.reset();
5706 } 5713 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698