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

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"
45 #include "content/browser/host_zoom_map_impl.h" 44 #include "content/browser/host_zoom_map_impl.h"
46 #include "content/browser/loader/resource_dispatcher_host_impl.h" 45 #include "content/browser/loader/resource_dispatcher_host_impl.h"
47 #include "content/browser/manifest/manifest_manager_host.h" 46 #include "content/browser/manifest/manifest_manager_host.h"
48 #include "content/browser/media/audio_stream_monitor.h" 47 #include "content/browser/media/audio_stream_monitor.h"
49 #include "content/browser/media/capture/web_contents_audio_muter.h" 48 #include "content/browser/media/capture/web_contents_audio_muter.h"
50 #include "content/browser/message_port_message_filter.h" 49 #include "content/browser/message_port_message_filter.h"
51 #include "content/browser/plugin_content_origin_whitelist.h" 50 #include "content/browser/plugin_content_origin_whitelist.h"
52 #include "content/browser/power_save_blocker_impl.h" 51 #include "content/browser/power_save_blocker_impl.h"
53 #include "content/browser/renderer_host/render_process_host_impl.h" 52 #include "content/browser/renderer_host/render_process_host_impl.h"
54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 53 #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), 389 closed_by_user_gesture_(false),
391 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), 390 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)),
392 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), 391 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
393 render_view_message_source_(NULL), 392 render_view_message_source_(NULL),
394 render_frame_message_source_(NULL), 393 render_frame_message_source_(NULL),
395 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), 394 fullscreen_widget_routing_id_(MSG_ROUTING_NONE),
396 fullscreen_widget_had_focus_at_shutdown_(false), 395 fullscreen_widget_had_focus_at_shutdown_(false),
397 is_subframe_(false), 396 is_subframe_(false),
398 force_disable_overscroll_content_(false), 397 force_disable_overscroll_content_(false),
399 last_dialog_suppressed_(false), 398 last_dialog_suppressed_(false),
400 geolocation_service_context_(new GeolocationServiceContext()),
401 accessibility_mode_( 399 accessibility_mode_(
402 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), 400 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
403 audio_stream_monitor_(this), 401 audio_stream_monitor_(this),
404 virtual_keyboard_requested_(false), 402 virtual_keyboard_requested_(false),
405 loading_weak_factory_(this) { 403 loading_weak_factory_(this) {
406 frame_tree_.SetFrameRemoveListener( 404 frame_tree_.SetFrameRemoveListener(
407 base::Bind(&WebContentsImpl::OnFrameRemoved, 405 base::Bind(&WebContentsImpl::OnFrameRemoved,
408 base::Unretained(this))); 406 base::Unretained(this)));
409 #if defined(ENABLE_BROWSER_CDMS) 407 #if defined(ENABLE_BROWSER_CDMS)
410 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); 408 media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 return nullptr; 2071 return nullptr;
2074 2072
2075 WebContents* guest = guest_manager->GetGuestByInstanceID( 2073 WebContents* guest = guest_manager->GetGuestByInstanceID(
2076 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); 2074 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id);
2077 if (!guest) 2075 if (!guest)
2078 return nullptr; 2076 return nullptr;
2079 2077
2080 return guest->GetMainFrame(); 2078 return guest->GetMainFrame();
2081 } 2079 }
2082 2080
2083 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() {
2084 return geolocation_service_context_.get();
2085 }
2086
2087 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { 2081 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() {
2088 return wake_lock_service_context_.get(); 2082 return wake_lock_service_context_.get();
2089 } 2083 }
2090 2084
2091 void WebContentsImpl::OnShowValidationMessage( 2085 void WebContentsImpl::OnShowValidationMessage(
2092 const gfx::Rect& anchor_in_root_view, 2086 const gfx::Rect& anchor_in_root_view,
2093 const base::string16& main_text, 2087 const base::string16& main_text,
2094 const base::string16& sub_text) { 2088 const base::string16& sub_text) {
2095 if (delegate_) 2089 if (delegate_)
2096 delegate_->ShowValidationMessage( 2090 delegate_->ShowValidationMessage(
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 return NULL; 4684 return NULL;
4691 } 4685 }
4692 4686
4693 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4687 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4694 force_disable_overscroll_content_ = force_disable; 4688 force_disable_overscroll_content_ = force_disable;
4695 if (view_) 4689 if (view_)
4696 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4690 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4697 } 4691 }
4698 4692
4699 } // namespace content 4693 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698