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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #include "content/common/notification_service.h" | 80 #include "content/common/notification_service.h" |
81 #include "content/common/pepper_messages.h" | 81 #include "content/common/pepper_messages.h" |
82 #include "content/common/renderer_preferences.h" | 82 #include "content/common/renderer_preferences.h" |
83 #include "content/common/view_messages.h" | 83 #include "content/common/view_messages.h" |
84 #include "content/renderer/audio_message_filter.h" | 84 #include "content/renderer/audio_message_filter.h" |
85 #include "content/renderer/content_renderer_client.h" | 85 #include "content/renderer/content_renderer_client.h" |
86 #include "content/renderer/device_orientation_dispatcher.h" | 86 #include "content/renderer/device_orientation_dispatcher.h" |
87 #include "content/renderer/external_popup_menu.h" | 87 #include "content/renderer/external_popup_menu.h" |
88 #include "content/renderer/geolocation_dispatcher.h" | 88 #include "content/renderer/geolocation_dispatcher.h" |
89 #include "content/renderer/ggl.h" | 89 #include "content/renderer/ggl.h" |
| 90 #include "content/renderer/introducer_dispatcher.h" |
90 #include "content/renderer/load_progress_tracker.h" | 91 #include "content/renderer/load_progress_tracker.h" |
91 #include "content/renderer/media/audio_renderer_impl.h" | 92 #include "content/renderer/media/audio_renderer_impl.h" |
92 #include "content/renderer/media/ipc_video_decoder.h" | 93 #include "content/renderer/media/ipc_video_decoder.h" |
93 #include "content/renderer/navigation_state.h" | 94 #include "content/renderer/navigation_state.h" |
94 #include "content/renderer/notification_provider.h" | 95 #include "content/renderer/notification_provider.h" |
95 #include "content/renderer/p2p/socket_dispatcher.h" | 96 #include "content/renderer/p2p/socket_dispatcher.h" |
96 #include "content/renderer/plugin_channel_host.h" | 97 #include "content/renderer/plugin_channel_host.h" |
97 #include "content/renderer/render_view_observer.h" | 98 #include "content/renderer/render_view_observer.h" |
98 #include "content/renderer/render_view_visitor.h" | 99 #include "content/renderer/render_view_visitor.h" |
99 #include "content/renderer/render_widget_fullscreen.h" | 100 #include "content/renderer/render_widget_fullscreen.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 573 |
573 if (counter) { | 574 if (counter) { |
574 shared_popup_counter_ = counter; | 575 shared_popup_counter_ = counter; |
575 shared_popup_counter_->data++; | 576 shared_popup_counter_->data++; |
576 decrement_shared_popup_at_destruction_ = true; | 577 decrement_shared_popup_at_destruction_ = true; |
577 } else { | 578 } else { |
578 shared_popup_counter_ = new SharedRenderViewCounter(0); | 579 shared_popup_counter_ = new SharedRenderViewCounter(0); |
579 decrement_shared_popup_at_destruction_ = false; | 580 decrement_shared_popup_at_destruction_ = false; |
580 } | 581 } |
581 | 582 |
| 583 introducer_dispatcher_ = makeIntroducerDispatcher(this); |
| 584 |
582 notification_provider_ = new NotificationProvider(this); | 585 notification_provider_ = new NotificationProvider(this); |
583 | 586 |
584 devtools_agent_ = new DevToolsAgent(this); | 587 devtools_agent_ = new DevToolsAgent(this); |
585 PasswordAutofillManager* password_autofill_manager = | 588 PasswordAutofillManager* password_autofill_manager = |
586 new PasswordAutofillManager(this); | 589 new PasswordAutofillManager(this); |
587 AutofillAgent* autofill_agent = new AutofillAgent(this, | 590 AutofillAgent* autofill_agent = new AutofillAgent(this, |
588 password_autofill_manager); | 591 password_autofill_manager); |
589 | 592 |
590 webwidget_ = WebView::create(this, devtools_agent_, autofill_agent); | 593 webwidget_ = WebView::create(this, devtools_agent_, autofill_agent); |
591 g_view_map.Get().insert(std::make_pair(webview(), this)); | 594 g_view_map.Get().insert(std::make_pair(webview(), this)); |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2073 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, | 2076 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, |
2074 UTF16ToWideHack(message.text), | 2077 UTF16ToWideHack(message.text), |
2075 static_cast<int32>(source_line), | 2078 static_cast<int32>(source_line), |
2076 UTF16ToWideHack(source_name))); | 2079 UTF16ToWideHack(source_name))); |
2077 } | 2080 } |
2078 | 2081 |
2079 void RenderView::printPage(WebFrame* frame) { | 2082 void RenderView::printPage(WebFrame* frame) { |
2080 print_helper_->ScriptInitiatedPrint(frame); | 2083 print_helper_->ScriptInitiatedPrint(frame); |
2081 } | 2084 } |
2082 | 2085 |
| 2086 WebKit::WebIntroducer* RenderView::introducerDispatcher() { |
| 2087 return introducer_dispatcher_; |
| 2088 } |
| 2089 |
2083 WebKit::WebNotificationPresenter* RenderView::notificationPresenter() { | 2090 WebKit::WebNotificationPresenter* RenderView::notificationPresenter() { |
2084 return notification_provider_; | 2091 return notification_provider_; |
2085 } | 2092 } |
2086 | 2093 |
2087 void RenderView::didStartLoading() { | 2094 void RenderView::didStartLoading() { |
2088 if (is_loading_) { | 2095 if (is_loading_) { |
2089 DLOG(WARNING) << "didStartLoading called while loading"; | 2096 DLOG(WARNING) << "didStartLoading called while loading"; |
2090 return; | 2097 return; |
2091 } | 2098 } |
2092 | 2099 |
(...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 const webkit_glue::CustomContextMenuContext& custom_context) { | 5381 const webkit_glue::CustomContextMenuContext& custom_context) { |
5375 if (custom_context.is_pepper_menu) | 5382 if (custom_context.is_pepper_menu) |
5376 pepper_delegate_.OnContextMenuClosed(custom_context); | 5383 pepper_delegate_.OnContextMenuClosed(custom_context); |
5377 else | 5384 else |
5378 context_menu_node_.reset(); | 5385 context_menu_node_.reset(); |
5379 } | 5386 } |
5380 | 5387 |
5381 void RenderView::OnNetworkStateChanged(bool online) { | 5388 void RenderView::OnNetworkStateChanged(bool online) { |
5382 WebNetworkStateNotifier::setOnLine(online); | 5389 WebNetworkStateNotifier::setOnLine(online); |
5383 } | 5390 } |
OLD | NEW |