OLD | NEW |
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 "content/renderer/render_view.h" | 5 #include "content/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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 RenderThread* current_thread = RenderThread::current(); | 632 RenderThread* current_thread = RenderThread::current(); |
633 SpellCheck* spellcheck = current_thread ? current_thread->spellchecker() : 0; | 633 SpellCheck* spellcheck = current_thread ? current_thread->spellchecker() : 0; |
634 spellcheck_provider_ = new SpellCheckProvider(this, spellcheck); | 634 spellcheck_provider_ = new SpellCheckProvider(this, spellcheck); |
635 webview()->setSpellCheckClient(spellcheck_provider_); | 635 webview()->setSpellCheckClient(spellcheck_provider_); |
636 | 636 |
637 if (CommandLine::ForCurrentProcess()->HasSwitch( | 637 if (CommandLine::ForCurrentProcess()->HasSwitch( |
638 switches::kEnableP2PApi)) { | 638 switches::kEnableP2PApi)) { |
639 p2p_socket_dispatcher_ = new P2PSocketDispatcher(this); | 639 p2p_socket_dispatcher_ = new P2PSocketDispatcher(this); |
640 } | 640 } |
641 | 641 |
642 if (CommandLine::ForCurrentProcess()->HasSwitch( | 642 #ifndef OS_CHROMEOS |
643 switches::kEnableClientSidePhishingDetection)) { | 643 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 644 switches::kDisableClientSidePhishingDetection)) { |
644 new safe_browsing::PhishingClassifierDelegate(this, NULL); | 645 new safe_browsing::PhishingClassifierDelegate(this, NULL); |
645 } | 646 } |
| 647 #endif |
646 | 648 |
647 // Observer for Malware DOM details messages. | 649 // Observer for Malware DOM details messages. |
648 new safe_browsing::MalwareDOMDetails(this); | 650 new safe_browsing::MalwareDOMDetails(this); |
649 | 651 |
650 new ExtensionHelper(this); | 652 new ExtensionHelper(this); |
651 } | 653 } |
652 | 654 |
653 RenderView::~RenderView() { | 655 RenderView::~RenderView() { |
654 if (decrement_shared_popup_at_destruction_) | 656 if (decrement_shared_popup_at_destruction_) |
655 shared_popup_counter_->data--; | 657 shared_popup_counter_->data--; |
(...skipping 4611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5267 const webkit_glue::CustomContextMenuContext& custom_context) { | 5269 const webkit_glue::CustomContextMenuContext& custom_context) { |
5268 if (custom_context.is_pepper_menu) | 5270 if (custom_context.is_pepper_menu) |
5269 pepper_delegate_.OnContextMenuClosed(custom_context); | 5271 pepper_delegate_.OnContextMenuClosed(custom_context); |
5270 else | 5272 else |
5271 context_menu_node_.reset(); | 5273 context_menu_node_.reset(); |
5272 } | 5274 } |
5273 | 5275 |
5274 void RenderView::OnNetworkStateChanged(bool online) { | 5276 void RenderView::OnNetworkStateChanged(bool online) { |
5275 WebNetworkStateNotifier::setOnLine(online); | 5277 WebNetworkStateNotifier::setOnLine(online); |
5276 } | 5278 } |
OLD | NEW |