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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 628773003: Partially convert geolocation IPC to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 18 matching lines...) Expand all
29 #include "content/browser/download/download_stats.h" 29 #include "content/browser/download/download_stats.h"
30 #include "content/browser/download/mhtml_generation_manager.h" 30 #include "content/browser/download/mhtml_generation_manager.h"
31 #include "content/browser/download/save_package.h" 31 #include "content/browser/download/save_package.h"
32 #include "content/browser/frame_host/cross_process_frame_connector.h" 32 #include "content/browser/frame_host/cross_process_frame_connector.h"
33 #include "content/browser/frame_host/interstitial_page_impl.h" 33 #include "content/browser/frame_host/interstitial_page_impl.h"
34 #include "content/browser/frame_host/navigation_entry_impl.h" 34 #include "content/browser/frame_host/navigation_entry_impl.h"
35 #include "content/browser/frame_host/navigator_impl.h" 35 #include "content/browser/frame_host/navigator_impl.h"
36 #include "content/browser/frame_host/render_frame_host_impl.h" 36 #include "content/browser/frame_host/render_frame_host_impl.h"
37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
38 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 38 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
39 #include "content/browser/geolocation/geolocation_service_context.h"
39 #include "content/browser/host_zoom_map_impl.h" 40 #include "content/browser/host_zoom_map_impl.h"
40 #include "content/browser/loader/resource_dispatcher_host_impl.h" 41 #include "content/browser/loader/resource_dispatcher_host_impl.h"
41 #include "content/browser/manifest/manifest_manager_host.h" 42 #include "content/browser/manifest/manifest_manager_host.h"
42 #include "content/browser/media/audio_stream_monitor.h" 43 #include "content/browser/media/audio_stream_monitor.h"
43 #include "content/browser/media/capture/web_contents_audio_muter.h" 44 #include "content/browser/media/capture/web_contents_audio_muter.h"
44 #include "content/browser/media/midi_dispatcher_host.h" 45 #include "content/browser/media/midi_dispatcher_host.h"
45 #include "content/browser/message_port_message_filter.h" 46 #include "content/browser/message_port_message_filter.h"
46 #include "content/browser/message_port_service.h" 47 #include "content/browser/message_port_service.h"
47 #include "content/browser/power_save_blocker_impl.h" 48 #include "content/browser/power_save_blocker_impl.h"
48 #include "content/browser/renderer_host/render_process_host_impl.h" 49 #include "content/browser/renderer_host/render_process_host_impl.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 render_frame_id(render_frame_id), 278 render_frame_id(render_frame_id),
278 chooser(chooser), 279 chooser(chooser),
279 identifier(identifier) { 280 identifier(identifier) {
280 } 281 }
281 282
282 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() { 283 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() {
283 } 284 }
284 285
285 // WebContentsImpl ------------------------------------------------------------- 286 // WebContentsImpl -------------------------------------------------------------
286 287
287 WebContentsImpl::WebContentsImpl( 288 WebContentsImpl::WebContentsImpl(BrowserContext* browser_context,
288 BrowserContext* browser_context, 289 WebContentsImpl* opener)
289 WebContentsImpl* opener)
290 : delegate_(NULL), 290 : delegate_(NULL),
291 controller_(this, browser_context), 291 controller_(this, browser_context),
292 render_view_host_delegate_view_(NULL), 292 render_view_host_delegate_view_(NULL),
293 opener_(opener), 293 opener_(opener),
294 created_with_opener_(!!opener), 294 created_with_opener_(!!opener),
295 #if defined(OS_WIN) 295 #if defined(OS_WIN)
296 accessible_parent_(NULL), 296 accessible_parent_(NULL),
297 #endif 297 #endif
298 frame_tree_(new NavigatorImpl(&controller_, this), 298 frame_tree_(new NavigatorImpl(&controller_, this),
299 this, this, this, this), 299 this,
300 this,
301 this,
302 this),
300 is_loading_(false), 303 is_loading_(false),
301 is_load_to_different_document_(false), 304 is_load_to_different_document_(false),
302 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), 305 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
303 crashed_error_code_(0), 306 crashed_error_code_(0),
304 waiting_for_response_(false), 307 waiting_for_response_(false),
305 load_state_(net::LOAD_STATE_IDLE, base::string16()), 308 load_state_(net::LOAD_STATE_IDLE, base::string16()),
306 loading_total_progress_(0.0), 309 loading_total_progress_(0.0),
307 loading_frames_in_progress_(0), 310 loading_frames_in_progress_(0),
308 upload_size_(0), 311 upload_size_(0),
309 upload_position_(0), 312 upload_position_(0),
(...skipping 10 matching lines...) Expand all
320 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), 323 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)),
321 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), 324 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
322 totalPinchGestureAmount_(0), 325 totalPinchGestureAmount_(0),
323 currentPinchZoomStepDelta_(0), 326 currentPinchZoomStepDelta_(0),
324 render_view_message_source_(NULL), 327 render_view_message_source_(NULL),
325 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), 328 fullscreen_widget_routing_id_(MSG_ROUTING_NONE),
326 fullscreen_widget_had_focus_at_shutdown_(false), 329 fullscreen_widget_had_focus_at_shutdown_(false),
327 is_subframe_(false), 330 is_subframe_(false),
328 force_disable_overscroll_content_(false), 331 force_disable_overscroll_content_(false),
329 last_dialog_suppressed_(false), 332 last_dialog_suppressed_(false),
333 geolocation_service_context_(new GeolocationServiceContext()),
330 accessibility_mode_( 334 accessibility_mode_(
331 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), 335 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
332 audio_stream_monitor_(this), 336 audio_stream_monitor_(this),
333 loading_weak_factory_(this) { 337 loading_weak_factory_(this) {
334 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++) 338 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
335 g_created_callbacks.Get().at(i).Run(this); 339 g_created_callbacks.Get().at(i).Run(this);
336 frame_tree_.SetFrameRemoveListener( 340 frame_tree_.SetFrameRemoveListener(
337 base::Bind(&WebContentsImpl::OnFrameRemoved, 341 base::Bind(&WebContentsImpl::OnFrameRemoved,
338 base::Unretained(this))); 342 base::Unretained(this)));
339 } 343 }
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 int browser_plugin_instance_id) { 1802 int browser_plugin_instance_id) {
1799 BrowserPluginGuestManager* guest_manager = 1803 BrowserPluginGuestManager* guest_manager =
1800 GetBrowserContext()->GetGuestManager(); 1804 GetBrowserContext()->GetGuestManager();
1801 WebContents* guest = guest_manager->GetGuestByInstanceID( 1805 WebContents* guest = guest_manager->GetGuestByInstanceID(
1802 this, browser_plugin_instance_id); 1806 this, browser_plugin_instance_id);
1803 if (!guest) 1807 if (!guest)
1804 return NULL; 1808 return NULL;
1805 return guest->GetMainFrame(); 1809 return guest->GetMainFrame();
1806 } 1810 }
1807 1811
1812 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() {
1813 return geolocation_service_context_.get();
1814 }
1815
1808 void WebContentsImpl::OnShowValidationMessage( 1816 void WebContentsImpl::OnShowValidationMessage(
1809 const gfx::Rect& anchor_in_root_view, 1817 const gfx::Rect& anchor_in_root_view,
1810 const base::string16& main_text, 1818 const base::string16& main_text,
1811 const base::string16& sub_text) { 1819 const base::string16& sub_text) {
1812 if (delegate_) 1820 if (delegate_)
1813 delegate_->ShowValidationMessage( 1821 delegate_->ShowValidationMessage(
1814 this, anchor_in_root_view, main_text, sub_text); 1822 this, anchor_in_root_view, main_text, sub_text);
1815 } 1823 }
1816 1824
1817 void WebContentsImpl::OnHideValidationMessage() { 1825 void WebContentsImpl::OnHideValidationMessage() {
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
4318 node->render_manager()->ResumeResponseDeferredAtStart(); 4326 node->render_manager()->ResumeResponseDeferredAtStart();
4319 } 4327 }
4320 4328
4321 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4329 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4322 force_disable_overscroll_content_ = force_disable; 4330 force_disable_overscroll_content_ = force_disable;
4323 if (view_) 4331 if (view_)
4324 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4332 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4325 } 4333 }
4326 4334
4327 } // namespace content 4335 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698