| OLD | NEW |
| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "content/renderer/browser_plugin/browser_plugin.h" | 64 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 65 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 65 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| 66 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" | 66 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" |
| 67 #include "content/renderer/device_orientation_dispatcher.h" | 67 #include "content/renderer/device_orientation_dispatcher.h" |
| 68 #include "content/renderer/devtools_agent.h" | 68 #include "content/renderer/devtools_agent.h" |
| 69 #include "content/renderer/disambiguation_popup_helper.h" | 69 #include "content/renderer/disambiguation_popup_helper.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/do_not_track_bindings.h" |
| 73 #include "content/renderer/external_popup_menu.h" | 73 #include "content/renderer/external_popup_menu.h" |
| 74 #include "content/renderer/favicon_helper.h" |
| 74 #include "content/renderer/geolocation_dispatcher.h" | 75 #include "content/renderer/geolocation_dispatcher.h" |
| 75 #include "content/renderer/gpu/compositor_thread.h" | 76 #include "content/renderer/gpu/compositor_thread.h" |
| 76 #include "content/renderer/gpu/compositor_output_surface.h" | 77 #include "content/renderer/gpu/compositor_output_surface.h" |
| 77 #include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h" | 78 #include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h" |
| 78 #include "content/renderer/idle_user_detector.h" | 79 #include "content/renderer/idle_user_detector.h" |
| 79 #include "content/renderer/input_tag_speech_dispatcher.h" | 80 #include "content/renderer/input_tag_speech_dispatcher.h" |
| 80 #include "content/renderer/java/java_bridge_dispatcher.h" | 81 #include "content/renderer/java/java_bridge_dispatcher.h" |
| 81 #include "content/renderer/load_progress_tracker.h" | 82 #include "content/renderer/load_progress_tracker.h" |
| 82 #include "content/renderer/media/media_stream_dependency_factory.h" | 83 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 83 #include "content/renderer/media/media_stream_dispatcher.h" | 84 #include "content/renderer/media/media_stream_dispatcher.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 speech_recognition_dispatcher_(NULL), | 579 speech_recognition_dispatcher_(NULL), |
| 579 device_orientation_dispatcher_(NULL), | 580 device_orientation_dispatcher_(NULL), |
| 580 media_stream_dispatcher_(NULL), | 581 media_stream_dispatcher_(NULL), |
| 581 browser_plugin_manager_(NULL), | 582 browser_plugin_manager_(NULL), |
| 582 media_stream_impl_(NULL), | 583 media_stream_impl_(NULL), |
| 583 devtools_agent_(NULL), | 584 devtools_agent_(NULL), |
| 584 accessibility_mode_(AccessibilityModeOff), | 585 accessibility_mode_(AccessibilityModeOff), |
| 585 renderer_accessibility_(NULL), | 586 renderer_accessibility_(NULL), |
| 586 java_bridge_dispatcher_(NULL), | 587 java_bridge_dispatcher_(NULL), |
| 587 mouse_lock_dispatcher_(NULL), | 588 mouse_lock_dispatcher_(NULL), |
| 589 favicon_helper_(NULL), |
| 588 #if defined(OS_ANDROID) | 590 #if defined(OS_ANDROID) |
| 589 body_background_color_(SK_ColorWHITE), | 591 body_background_color_(SK_ColorWHITE), |
| 590 update_frame_info_scheduled_(false), | 592 update_frame_info_scheduled_(false), |
| 591 expected_content_intent_id_(0), | 593 expected_content_intent_id_(0), |
| 592 media_player_proxy_(NULL), | 594 media_player_proxy_(NULL), |
| 593 synchronous_find_active_match_ordinal_(-1), | 595 synchronous_find_active_match_ordinal_(-1), |
| 594 ALLOW_THIS_IN_INITIALIZER_LIST( | 596 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 595 load_progress_tracker_(new LoadProgressTracker(this))), | 597 load_progress_tracker_(new LoadProgressTracker(this))), |
| 596 #endif | 598 #endif |
| 597 session_storage_namespace_id_(params->session_storage_namespace_id), | 599 session_storage_namespace_id_(params->session_storage_namespace_id), |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 #if defined(OS_ANDROID) | 698 #if defined(OS_ANDROID) |
| 697 media_player_manager_.reset( | 699 media_player_manager_.reset( |
| 698 new webkit_media::WebMediaPlayerManagerAndroid()); | 700 new webkit_media::WebMediaPlayerManagerAndroid()); |
| 699 #endif | 701 #endif |
| 700 | 702 |
| 701 // The next group of objects all implement RenderViewObserver, so are deleted | 703 // The next group of objects all implement RenderViewObserver, so are deleted |
| 702 // along with the RenderView automatically. | 704 // along with the RenderView automatically. |
| 703 devtools_agent_ = new DevToolsAgent(this); | 705 devtools_agent_ = new DevToolsAgent(this); |
| 704 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); | 706 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); |
| 705 intents_host_ = new WebIntentsHost(this); | 707 intents_host_ = new WebIntentsHost(this); |
| 708 favicon_helper_ = new FaviconHelper(this); |
| 706 | 709 |
| 707 // Create renderer_accessibility_ if needed. | 710 // Create renderer_accessibility_ if needed. |
| 708 OnSetAccessibilityMode(params->accessibility_mode); | 711 OnSetAccessibilityMode(params->accessibility_mode); |
| 709 | 712 |
| 710 new IdleUserDetector(this); | 713 new IdleUserDetector(this); |
| 711 | 714 |
| 712 if (command_line.HasSwitch(switches::kDomAutomationController)) | 715 if (command_line.HasSwitch(switches::kDomAutomationController)) |
| 713 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 716 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
| 714 | 717 |
| 715 ProcessViewLayoutFlags(command_line); | 718 ProcessViewLayoutFlags(command_line); |
| (...skipping 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3473 | 3476 |
| 3474 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, | 3477 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, |
| 3475 WebTextDirection direction) { | 3478 WebTextDirection direction) { |
| 3476 UpdateTitle(frame, title, direction); | 3479 UpdateTitle(frame, title, direction); |
| 3477 | 3480 |
| 3478 // Also check whether we have new encoding name. | 3481 // Also check whether we have new encoding name. |
| 3479 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | 3482 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); |
| 3480 } | 3483 } |
| 3481 | 3484 |
| 3482 void RenderViewImpl::didChangeIcon(WebFrame* frame, WebIconURL::Type type) { | 3485 void RenderViewImpl::didChangeIcon(WebFrame* frame, WebIconURL::Type type) { |
| 3483 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3486 favicon_helper_->DidChangeIcon(frame, type); |
| 3484 DidChangeIcon(frame, type)); | |
| 3485 } | 3487 } |
| 3486 | 3488 |
| 3487 void RenderViewImpl::didFinishDocumentLoad(WebFrame* frame) { | 3489 void RenderViewImpl::didFinishDocumentLoad(WebFrame* frame) { |
| 3488 WebDataSource* ds = frame->dataSource(); | 3490 WebDataSource* ds = frame->dataSource(); |
| 3489 DocumentState* document_state = DocumentState::FromDataSource(ds); | 3491 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 3490 document_state->set_finish_document_load_time(Time::Now()); | 3492 document_state->set_finish_document_load_time(Time::Now()); |
| 3491 | 3493 |
| 3492 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); | 3494 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); |
| 3493 | 3495 |
| 3494 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3496 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| (...skipping 2942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6437 } | 6439 } |
| 6438 #endif | 6440 #endif |
| 6439 | 6441 |
| 6440 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6442 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6441 TransportDIB::Handle dib_handle) { | 6443 TransportDIB::Handle dib_handle) { |
| 6442 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6444 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6443 RenderProcess::current()->ReleaseTransportDIB(dib); | 6445 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6444 } | 6446 } |
| 6445 | 6447 |
| 6446 } // namespace content | 6448 } // namespace content |
| OLD | NEW |