Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: chrome/renderer/render_view.cc

Issue 5612005: Client-based geolocation support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 5498 matching lines...) Expand 10 before | Expand all | Expand 10 after
5574 5578
5575 void RenderView::OnPageTranslated() { 5579 void RenderView::OnPageTranslated() {
5576 WebFrame* frame = webview()->mainFrame(); 5580 WebFrame* frame = webview()->mainFrame();
5577 if (!frame) 5581 if (!frame)
5578 return; 5582 return;
5579 5583
5580 // The page is translated, so try to extract the form data again. 5584 // The page is translated, so try to extract the form data again.
5581 autofill_helper_->FrameContentsAvailable(frame); 5585 autofill_helper_->FrameContentsAvailable(frame);
5582 } 5586 }
5583 5587
5588 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
5589 WebKit::WebGeolocationClient* RenderView::geolocationClient()
5590 {
5591 if (!geolocation_dispatcher_.get())
5592 geolocation_dispatcher_.reset(new GeolocationDispatcher(this));
5593 return geolocation_dispatcher_.get();
5594 }
5595 #else
5584 WebKit::WebGeolocationService* RenderView::geolocationService() { 5596 WebKit::WebGeolocationService* RenderView::geolocationService() {
5585 if (!geolocation_dispatcher_.get()) 5597 if (!geolocation_dispatcher_.get())
5586 geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this)); 5598 geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this));
5587 return geolocation_dispatcher_.get(); 5599 return geolocation_dispatcher_.get();
5588 } 5600 }
5589 5601 #endif
bulach 2010/12/07 11:18:42 \n
5590 WebKit::WebSpeechInputController* RenderView::speechInputController( 5602 WebKit::WebSpeechInputController* RenderView::speechInputController(
5591 WebKit::WebSpeechInputListener* listener) { 5603 WebKit::WebSpeechInputListener* listener) {
5592 if (!speech_input_dispatcher_.get()) 5604 if (!speech_input_dispatcher_.get())
5593 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener)); 5605 speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener));
5594 return speech_input_dispatcher_.get(); 5606 return speech_input_dispatcher_.get();
5595 } 5607 }
5596 5608
5597 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { 5609 WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() {
5598 if (!device_orientation_dispatcher_.get()) 5610 if (!device_orientation_dispatcher_.get())
5599 device_orientation_dispatcher_.reset(new DeviceOrientationDispatcher(this)); 5611 device_orientation_dispatcher_.reset(new DeviceOrientationDispatcher(this));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
5687 external_popup_menu_.reset(); 5699 external_popup_menu_.reset();
5688 } 5700 }
5689 #endif 5701 #endif
5690 5702
5691 void RenderView::AddErrorToRootConsole(const string16& message) { 5703 void RenderView::AddErrorToRootConsole(const string16& message) {
5692 if (webview() && webview()->mainFrame()) { 5704 if (webview() && webview()->mainFrame()) {
5693 webview()->mainFrame()->addMessageToConsole( 5705 webview()->mainFrame()->addMessageToConsole(
5694 WebConsoleMessage(WebConsoleMessage::LevelError, message)); 5706 WebConsoleMessage(WebConsoleMessage::LevelError, message));
5695 } 5707 }
5696 } 5708 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698