| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "chrome/renderer/devtools_client.h" | 56 #include "chrome/renderer/devtools_client.h" |
| 57 #include "chrome/renderer/dom_ui_bindings.h" | 57 #include "chrome/renderer/dom_ui_bindings.h" |
| 58 #include "chrome/renderer/extension_groups.h" | 58 #include "chrome/renderer/extension_groups.h" |
| 59 #include "chrome/renderer/extensions/bindings_utils.h" | 59 #include "chrome/renderer/extensions/bindings_utils.h" |
| 60 #include "chrome/renderer/extensions/event_bindings.h" | 60 #include "chrome/renderer/extensions/event_bindings.h" |
| 61 #include "chrome/renderer/extensions/extension_process_bindings.h" | 61 #include "chrome/renderer/extensions/extension_process_bindings.h" |
| 62 #include "chrome/renderer/extensions/extension_renderer_info.h" | 62 #include "chrome/renderer/extensions/extension_renderer_info.h" |
| 63 #include "chrome/renderer/extensions/renderer_extension_bindings.h" | 63 #include "chrome/renderer/extensions/renderer_extension_bindings.h" |
| 64 #include "chrome/renderer/external_host_bindings.h" | 64 #include "chrome/renderer/external_host_bindings.h" |
| 65 #include "chrome/renderer/external_popup_menu.h" | 65 #include "chrome/renderer/external_popup_menu.h" |
| 66 #if ENABLE_CLIENT_BASED_GEOLOCATION | |
| 67 #include "chrome/renderer/geolocation_dispatcher.h" | |
| 68 #else | |
| 69 #include "chrome/renderer/geolocation_dispatcher_old.h" | 66 #include "chrome/renderer/geolocation_dispatcher_old.h" |
| 70 #endif | |
| 71 #include "chrome/renderer/ggl/ggl.h" | 67 #include "chrome/renderer/ggl/ggl.h" |
| 72 #include "chrome/renderer/localized_error.h" | 68 #include "chrome/renderer/localized_error.h" |
| 73 #include "chrome/renderer/media/audio_renderer_impl.h" | 69 #include "chrome/renderer/media/audio_renderer_impl.h" |
| 74 #include "chrome/renderer/media/ipc_video_decoder.h" | 70 #include "chrome/renderer/media/ipc_video_decoder.h" |
| 75 #include "chrome/renderer/navigation_state.h" | 71 #include "chrome/renderer/navigation_state.h" |
| 76 #include "chrome/renderer/notification_provider.h" | 72 #include "chrome/renderer/notification_provider.h" |
| 77 #include "chrome/renderer/page_click_tracker.h" | 73 #include "chrome/renderer/page_click_tracker.h" |
| 78 #include "chrome/renderer/page_load_histograms.h" | 74 #include "chrome/renderer/page_load_histograms.h" |
| 79 #include "chrome/renderer/password_autocomplete_manager.h" | 75 #include "chrome/renderer/password_autocomplete_manager.h" |
| 80 #include "chrome/renderer/plugin_channel_host.h" | 76 #include "chrome/renderer/plugin_channel_host.h" |
| (...skipping 5535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5616 | 5612 |
| 5617 void RenderView::OnPageTranslated() { | 5613 void RenderView::OnPageTranslated() { |
| 5618 WebFrame* frame = webview()->mainFrame(); | 5614 WebFrame* frame = webview()->mainFrame(); |
| 5619 if (!frame) | 5615 if (!frame) |
| 5620 return; | 5616 return; |
| 5621 | 5617 |
| 5622 // The page is translated, so try to extract the form data again. | 5618 // The page is translated, so try to extract the form data again. |
| 5623 autofill_helper_->FrameContentsAvailable(frame); | 5619 autofill_helper_->FrameContentsAvailable(frame); |
| 5624 } | 5620 } |
| 5625 | 5621 |
| 5626 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION) | |
| 5627 WebKit::WebGeolocationClient* RenderView::geolocationClient() | |
| 5628 { | |
| 5629 if (!geolocation_dispatcher_.get()) | |
| 5630 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | |
| 5631 return geolocation_dispatcher_.get(); | |
| 5632 } | |
| 5633 #else | |
| 5634 WebKit::WebGeolocationService* RenderView::geolocationService() { | 5622 WebKit::WebGeolocationService* RenderView::geolocationService() { |
| 5635 if (!geolocation_dispatcher_.get()) | 5623 if (!geolocation_dispatcher_.get()) |
| 5636 geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this)); | 5624 geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this)); |
| 5637 return geolocation_dispatcher_.get(); | 5625 return geolocation_dispatcher_.get(); |
| 5638 } | 5626 } |
| 5639 #endif | |
| 5640 | 5627 |
| 5641 WebKit::WebSpeechInputController* RenderView::speechInputController( | 5628 WebKit::WebSpeechInputController* RenderView::speechInputController( |
| 5642 WebKit::WebSpeechInputListener* listener) { | 5629 WebKit::WebSpeechInputListener* listener) { |
| 5643 if (!speech_input_dispatcher_.get()) | 5630 if (!speech_input_dispatcher_.get()) |
| 5644 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener)); | 5631 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener)); |
| 5645 return speech_input_dispatcher_.get(); | 5632 return speech_input_dispatcher_.get(); |
| 5646 } | 5633 } |
| 5647 | 5634 |
| 5648 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { | 5635 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { |
| 5649 if (!device_orientation_dispatcher_.get()) | 5636 if (!device_orientation_dispatcher_.get()) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5746 external_popup_menu_.reset(); | 5733 external_popup_menu_.reset(); |
| 5747 } | 5734 } |
| 5748 #endif | 5735 #endif |
| 5749 | 5736 |
| 5750 void RenderView::AddErrorToRootConsole(const string16& message) { | 5737 void RenderView::AddErrorToRootConsole(const string16& message) { |
| 5751 if (webview() && webview()->mainFrame()) { | 5738 if (webview() && webview()->mainFrame()) { |
| 5752 webview()->mainFrame()->addMessageToConsole( | 5739 webview()->mainFrame()->addMessageToConsole( |
| 5753 WebConsoleMessage(WebConsoleMessage::LevelError, message)); | 5740 WebConsoleMessage(WebConsoleMessage::LevelError, message)); |
| 5754 } | 5741 } |
| 5755 } | 5742 } |
| OLD | NEW |