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