| OLD | NEW |
| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |