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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 418 |
419 host_window_ = parent_hwnd; | 419 host_window_ = parent_hwnd; |
420 | 420 |
421 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 421 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
422 if (command_line.HasSwitch(switches::kEnableAccessibility)) | 422 if (command_line.HasSwitch(switches::kEnableAccessibility)) |
423 WebAccessibilityCache::enableAccessibility(); | 423 WebAccessibilityCache::enableAccessibility(); |
424 | 424 |
425 audio_message_filter_ = new AudioMessageFilter(routing_id_); | 425 audio_message_filter_ = new AudioMessageFilter(routing_id_); |
426 render_thread_->AddFilter(audio_message_filter_); | 426 render_thread_->AddFilter(audio_message_filter_); |
427 | 427 |
| 428 #if defined(ENABLE_P2P_APIS) |
428 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 429 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) |
429 p2p_socket_dispatcher_ = new P2PSocketDispatcher(this); | 430 p2p_socket_dispatcher_ = new P2PSocketDispatcher(this); |
| 431 #endif |
430 | 432 |
431 content::GetContentClient()->renderer()->RenderViewCreated(this); | 433 content::GetContentClient()->renderer()->RenderViewCreated(this); |
432 } | 434 } |
433 | 435 |
434 RenderView::~RenderView() { | 436 RenderView::~RenderView() { |
435 if (decrement_shared_popup_at_destruction_) | 437 if (decrement_shared_popup_at_destruction_) |
436 shared_popup_counter_->data--; | 438 shared_popup_counter_->data--; |
437 | 439 |
438 // If file chooser is still waiting for answer, dispatch empty answer. | 440 // If file chooser is still waiting for answer, dispatch empty answer. |
439 while (!file_chooser_completions_.empty()) { | 441 while (!file_chooser_completions_.empty()) { |
(...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4245 const webkit_glue::CustomContextMenuContext& custom_context) { | 4247 const webkit_glue::CustomContextMenuContext& custom_context) { |
4246 if (custom_context.is_pepper_menu) | 4248 if (custom_context.is_pepper_menu) |
4247 pepper_delegate_.OnContextMenuClosed(custom_context); | 4249 pepper_delegate_.OnContextMenuClosed(custom_context); |
4248 else | 4250 else |
4249 context_menu_node_.reset(); | 4251 context_menu_node_.reset(); |
4250 } | 4252 } |
4251 | 4253 |
4252 void RenderView::OnNetworkStateChanged(bool online) { | 4254 void RenderView::OnNetworkStateChanged(bool online) { |
4253 WebNetworkStateNotifier::setOnLine(online); | 4255 WebNetworkStateNotifier::setOnLine(online); |
4254 } | 4256 } |
OLD | NEW |