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

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

Issue 1411063007: Add mojo::StrongBindingSet and use it in GeolocationServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 23 matching lines...) Expand all
34 #include "content/browser/download/download_stats.h" 34 #include "content/browser/download/download_stats.h"
35 #include "content/browser/download/mhtml_generation_manager.h" 35 #include "content/browser/download/mhtml_generation_manager.h"
36 #include "content/browser/download/save_package.h" 36 #include "content/browser/download/save_package.h"
37 #include "content/browser/frame_host/cross_process_frame_connector.h" 37 #include "content/browser/frame_host/cross_process_frame_connector.h"
38 #include "content/browser/frame_host/interstitial_page_impl.h" 38 #include "content/browser/frame_host/interstitial_page_impl.h"
39 #include "content/browser/frame_host/navigation_entry_impl.h" 39 #include "content/browser/frame_host/navigation_entry_impl.h"
40 #include "content/browser/frame_host/navigation_handle_impl.h" 40 #include "content/browser/frame_host/navigation_handle_impl.h"
41 #include "content/browser/frame_host/navigator_impl.h" 41 #include "content/browser/frame_host/navigator_impl.h"
42 #include "content/browser/frame_host/render_frame_host_impl.h" 42 #include "content/browser/frame_host/render_frame_host_impl.h"
43 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 43 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
44 #include "content/browser/geolocation/geolocation_service_context.h" 44 #include "content/browser/geolocation/geolocation_service_context.h"
Michael van Ouwerkerk 2015/11/11 11:20:56 nit: unused, delete
Sam McNally 2015/11/13 00:49:59 Done.
45 #include "content/browser/host_zoom_map_impl.h" 45 #include "content/browser/host_zoom_map_impl.h"
46 #include "content/browser/loader/resource_dispatcher_host_impl.h" 46 #include "content/browser/loader/resource_dispatcher_host_impl.h"
47 #include "content/browser/manifest/manifest_manager_host.h" 47 #include "content/browser/manifest/manifest_manager_host.h"
48 #include "content/browser/media/audio_stream_monitor.h" 48 #include "content/browser/media/audio_stream_monitor.h"
49 #include "content/browser/media/capture/web_contents_audio_muter.h" 49 #include "content/browser/media/capture/web_contents_audio_muter.h"
50 #include "content/browser/message_port_message_filter.h" 50 #include "content/browser/message_port_message_filter.h"
51 #include "content/browser/plugin_content_origin_whitelist.h" 51 #include "content/browser/plugin_content_origin_whitelist.h"
52 #include "content/browser/power_save_blocker_impl.h" 52 #include "content/browser/power_save_blocker_impl.h"
53 #include "content/browser/renderer_host/render_process_host_impl.h" 53 #include "content/browser/renderer_host/render_process_host_impl.h"
54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 54 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 closed_by_user_gesture_(false), 390 closed_by_user_gesture_(false),
391 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), 391 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)),
392 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), 392 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
393 render_view_message_source_(NULL), 393 render_view_message_source_(NULL),
394 render_frame_message_source_(NULL), 394 render_frame_message_source_(NULL),
395 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), 395 fullscreen_widget_routing_id_(MSG_ROUTING_NONE),
396 fullscreen_widget_had_focus_at_shutdown_(false), 396 fullscreen_widget_had_focus_at_shutdown_(false),
397 is_subframe_(false), 397 is_subframe_(false),
398 force_disable_overscroll_content_(false), 398 force_disable_overscroll_content_(false),
399 last_dialog_suppressed_(false), 399 last_dialog_suppressed_(false),
400 geolocation_service_context_(new GeolocationServiceContext()),
401 accessibility_mode_( 400 accessibility_mode_(
402 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), 401 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
403 audio_stream_monitor_(this), 402 audio_stream_monitor_(this),
404 virtual_keyboard_requested_(false), 403 virtual_keyboard_requested_(false),
405 loading_weak_factory_(this) { 404 loading_weak_factory_(this) {
406 frame_tree_.SetFrameRemoveListener( 405 frame_tree_.SetFrameRemoveListener(
407 base::Bind(&WebContentsImpl::OnFrameRemoved, 406 base::Bind(&WebContentsImpl::OnFrameRemoved,
408 base::Unretained(this))); 407 base::Unretained(this)));
409 #if defined(ENABLE_BROWSER_CDMS) 408 #if defined(ENABLE_BROWSER_CDMS)
410 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); 409 media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 return nullptr; 2072 return nullptr;
2074 2073
2075 WebContents* guest = guest_manager->GetGuestByInstanceID( 2074 WebContents* guest = guest_manager->GetGuestByInstanceID(
2076 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); 2075 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id);
2077 if (!guest) 2076 if (!guest)
2078 return nullptr; 2077 return nullptr;
2079 2078
2080 return guest->GetMainFrame(); 2079 return guest->GetMainFrame();
2081 } 2080 }
2082 2081
2083 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() {
2084 return geolocation_service_context_.get();
2085 }
2086
2087 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { 2082 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() {
2088 return wake_lock_service_context_.get(); 2083 return wake_lock_service_context_.get();
2089 } 2084 }
2090 2085
2091 void WebContentsImpl::OnShowValidationMessage( 2086 void WebContentsImpl::OnShowValidationMessage(
2092 const gfx::Rect& anchor_in_root_view, 2087 const gfx::Rect& anchor_in_root_view,
2093 const base::string16& main_text, 2088 const base::string16& main_text,
2094 const base::string16& sub_text) { 2089 const base::string16& sub_text) {
2095 if (delegate_) 2090 if (delegate_)
2096 delegate_->ShowValidationMessage( 2091 delegate_->ShowValidationMessage(
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 return NULL; 4685 return NULL;
4691 } 4686 }
4692 4687
4693 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4688 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4694 force_disable_overscroll_content_ = force_disable; 4689 force_disable_overscroll_content_ = force_disable;
4695 if (view_) 4690 if (view_)
4696 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4691 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4697 } 4692 }
4698 4693
4699 } // namespace content 4694 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698