| 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" | 66 #include "chrome/renderer/geolocation_dispatcher.h" |
| 68 #else | |
| 69 #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/load_progress_tracker.h" | 68 #include "chrome/renderer/load_progress_tracker.h" |
| 73 #include "chrome/renderer/localized_error.h" | 69 #include "chrome/renderer/localized_error.h" |
| 74 #include "chrome/renderer/media/audio_renderer_impl.h" | 70 #include "chrome/renderer/media/audio_renderer_impl.h" |
| 75 #include "chrome/renderer/media/ipc_video_decoder.h" | 71 #include "chrome/renderer/media/ipc_video_decoder.h" |
| 76 #include "chrome/renderer/navigation_state.h" | 72 #include "chrome/renderer/navigation_state.h" |
| 77 #include "chrome/renderer/notification_provider.h" | 73 #include "chrome/renderer/notification_provider.h" |
| 78 #include "chrome/renderer/page_click_tracker.h" | 74 #include "chrome/renderer/page_click_tracker.h" |
| 79 #include "chrome/renderer/page_load_histograms.h" | 75 #include "chrome/renderer/page_load_histograms.h" |
| 80 #include "chrome/renderer/password_autocomplete_manager.h" | 76 #include "chrome/renderer/password_autocomplete_manager.h" |
| (...skipping 5548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5629 void RenderView::OnPageTranslated() { | 5625 void RenderView::OnPageTranslated() { |
| 5630 WebFrame* frame = webview()->mainFrame(); | 5626 WebFrame* frame = webview()->mainFrame(); |
| 5631 if (!frame) | 5627 if (!frame) |
| 5632 return; | 5628 return; |
| 5633 | 5629 |
| 5634 // The page is translated, so try to extract the form data again. | 5630 // The page is translated, so try to extract the form data again. |
| 5635 autofill_helper_->FrameContentsAvailable(frame); | 5631 autofill_helper_->FrameContentsAvailable(frame); |
| 5636 } | 5632 } |
| 5637 | 5633 |
| 5638 WebKit::WebGeolocationClient* RenderView::geolocationClient() { | 5634 WebKit::WebGeolocationClient* RenderView::geolocationClient() { |
| 5639 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION) | |
| 5640 if (!geolocation_dispatcher_.get()) | 5635 if (!geolocation_dispatcher_.get()) |
| 5641 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 5636 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
| 5642 return geolocation_dispatcher_.get(); | 5637 return geolocation_dispatcher_.get(); |
| 5643 #else | |
| 5644 // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION. | |
| 5645 NOTREACHED(); | |
| 5646 return 0; | |
| 5647 #endif | |
| 5648 } | |
| 5649 | |
| 5650 WebKit::WebGeolocationService* RenderView::geolocationService() { | |
| 5651 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION) | |
| 5652 NOTREACHED(); | |
| 5653 return 0; | |
| 5654 #else | |
| 5655 if (!geolocation_dispatcher_.get()) | |
| 5656 geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this)); | |
| 5657 return geolocation_dispatcher_.get(); | |
| 5658 #endif | |
| 5659 } | 5638 } |
| 5660 | 5639 |
| 5661 WebKit::WebSpeechInputController* RenderView::speechInputController( | 5640 WebKit::WebSpeechInputController* RenderView::speechInputController( |
| 5662 WebKit::WebSpeechInputListener* listener) { | 5641 WebKit::WebSpeechInputListener* listener) { |
| 5663 if (!speech_input_dispatcher_.get()) | 5642 if (!speech_input_dispatcher_.get()) |
| 5664 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener)); | 5643 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener)); |
| 5665 return speech_input_dispatcher_.get(); | 5644 return speech_input_dispatcher_.get(); |
| 5666 } | 5645 } |
| 5667 | 5646 |
| 5668 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { | 5647 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5766 external_popup_menu_.reset(); | 5745 external_popup_menu_.reset(); |
| 5767 } | 5746 } |
| 5768 #endif | 5747 #endif |
| 5769 | 5748 |
| 5770 void RenderView::AddErrorToRootConsole(const string16& message) { | 5749 void RenderView::AddErrorToRootConsole(const string16& message) { |
| 5771 if (webview() && webview()->mainFrame()) { | 5750 if (webview() && webview()->mainFrame()) { |
| 5772 webview()->mainFrame()->addMessageToConsole( | 5751 webview()->mainFrame()->addMessageToConsole( |
| 5773 WebConsoleMessage(WebConsoleMessage::LevelError, message)); | 5752 WebConsoleMessage(WebConsoleMessage::LevelError, message)); |
| 5774 } | 5753 } |
| 5775 } | 5754 } |
| OLD | NEW |