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

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

Issue 680323002: Revert of Partially convert geolocation IPC to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
40 #include "content/browser/host_zoom_map_impl.h" 39 #include "content/browser/host_zoom_map_impl.h"
41 #include "content/browser/loader/resource_dispatcher_host_impl.h" 40 #include "content/browser/loader/resource_dispatcher_host_impl.h"
42 #include "content/browser/manifest/manifest_manager_host.h" 41 #include "content/browser/manifest/manifest_manager_host.h"
43 #include "content/browser/media/audio_stream_monitor.h" 42 #include "content/browser/media/audio_stream_monitor.h"
44 #include "content/browser/media/capture/web_contents_audio_muter.h" 43 #include "content/browser/media/capture/web_contents_audio_muter.h"
45 #include "content/browser/media/midi_dispatcher_host.h" 44 #include "content/browser/media/midi_dispatcher_host.h"
46 #include "content/browser/message_port_message_filter.h" 45 #include "content/browser/message_port_message_filter.h"
47 #include "content/browser/message_port_service.h" 46 #include "content/browser/message_port_service.h"
48 #include "content/browser/power_save_blocker_impl.h" 47 #include "content/browser/power_save_blocker_impl.h"
49 #include "content/browser/renderer_host/render_process_host_impl.h" 48 #include "content/browser/renderer_host/render_process_host_impl.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 render_frame_id(render_frame_id), 277 render_frame_id(render_frame_id),
279 chooser(chooser), 278 chooser(chooser),
280 identifier(identifier) { 279 identifier(identifier) {
281 } 280 }
282 281
283 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() { 282 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() {
284 } 283 }
285 284
286 // WebContentsImpl ------------------------------------------------------------- 285 // WebContentsImpl -------------------------------------------------------------
287 286
288 WebContentsImpl::WebContentsImpl(BrowserContext* browser_context, 287 WebContentsImpl::WebContentsImpl(
289 WebContentsImpl* opener) 288 BrowserContext* browser_context,
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, 299 this, this, this, this),
300 this,
301 this,
302 this),
303 is_loading_(false), 300 is_loading_(false),
304 is_load_to_different_document_(false), 301 is_load_to_different_document_(false),
305 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), 302 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
306 crashed_error_code_(0), 303 crashed_error_code_(0),
307 waiting_for_response_(false), 304 waiting_for_response_(false),
308 load_state_(net::LOAD_STATE_IDLE, base::string16()), 305 load_state_(net::LOAD_STATE_IDLE, base::string16()),
309 loading_total_progress_(0.0), 306 loading_total_progress_(0.0),
310 loading_frames_in_progress_(0), 307 loading_frames_in_progress_(0),
311 upload_size_(0), 308 upload_size_(0),
312 upload_position_(0), 309 upload_position_(0),
(...skipping 10 matching lines...) Expand all
323 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), 320 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)),
324 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), 321 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
325 totalPinchGestureAmount_(0), 322 totalPinchGestureAmount_(0),
326 currentPinchZoomStepDelta_(0), 323 currentPinchZoomStepDelta_(0),
327 render_view_message_source_(NULL), 324 render_view_message_source_(NULL),
328 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), 325 fullscreen_widget_routing_id_(MSG_ROUTING_NONE),
329 fullscreen_widget_had_focus_at_shutdown_(false), 326 fullscreen_widget_had_focus_at_shutdown_(false),
330 is_subframe_(false), 327 is_subframe_(false),
331 force_disable_overscroll_content_(false), 328 force_disable_overscroll_content_(false),
332 last_dialog_suppressed_(false), 329 last_dialog_suppressed_(false),
333 geolocation_service_context_(new GeolocationServiceContext()),
334 accessibility_mode_( 330 accessibility_mode_(
335 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), 331 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
336 audio_stream_monitor_(this), 332 audio_stream_monitor_(this),
337 loading_weak_factory_(this) { 333 loading_weak_factory_(this) {
338 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++) 334 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
339 g_created_callbacks.Get().at(i).Run(this); 335 g_created_callbacks.Get().at(i).Run(this);
340 frame_tree_.SetFrameRemoveListener( 336 frame_tree_.SetFrameRemoveListener(
341 base::Bind(&WebContentsImpl::OnFrameRemoved, 337 base::Bind(&WebContentsImpl::OnFrameRemoved,
342 base::Unretained(this))); 338 base::Unretained(this)));
343 } 339 }
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 int browser_plugin_instance_id) { 1798 int browser_plugin_instance_id) {
1803 BrowserPluginGuestManager* guest_manager = 1799 BrowserPluginGuestManager* guest_manager =
1804 GetBrowserContext()->GetGuestManager(); 1800 GetBrowserContext()->GetGuestManager();
1805 WebContents* guest = guest_manager->GetGuestByInstanceID( 1801 WebContents* guest = guest_manager->GetGuestByInstanceID(
1806 this, browser_plugin_instance_id); 1802 this, browser_plugin_instance_id);
1807 if (!guest) 1803 if (!guest)
1808 return NULL; 1804 return NULL;
1809 return guest->GetMainFrame(); 1805 return guest->GetMainFrame();
1810 } 1806 }
1811 1807
1812 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() {
1813 return geolocation_service_context_.get();
1814 }
1815
1816 void WebContentsImpl::OnShowValidationMessage( 1808 void WebContentsImpl::OnShowValidationMessage(
1817 const gfx::Rect& anchor_in_root_view, 1809 const gfx::Rect& anchor_in_root_view,
1818 const base::string16& main_text, 1810 const base::string16& main_text,
1819 const base::string16& sub_text) { 1811 const base::string16& sub_text) {
1820 if (delegate_) 1812 if (delegate_)
1821 delegate_->ShowValidationMessage( 1813 delegate_->ShowValidationMessage(
1822 this, anchor_in_root_view, main_text, sub_text); 1814 this, anchor_in_root_view, main_text, sub_text);
1823 } 1815 }
1824 1816
1825 void WebContentsImpl::OnHideValidationMessage() { 1817 void WebContentsImpl::OnHideValidationMessage() {
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
4326 node->render_manager()->ResumeResponseDeferredAtStart(); 4318 node->render_manager()->ResumeResponseDeferredAtStart();
4327 } 4319 }
4328 4320
4329 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4321 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4330 force_disable_overscroll_content_ = force_disable; 4322 force_disable_overscroll_content_ = force_disable;
4331 if (view_) 4323 if (view_)
4332 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4324 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4333 } 4325 }
4334 4326
4335 } // namespace content 4327 } // 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