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

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

Issue 1107333002: Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/browser/message_port_message_filter.h" 45 #include "content/browser/message_port_message_filter.h"
46 #include "content/browser/plugin_content_origin_whitelist.h" 46 #include "content/browser/plugin_content_origin_whitelist.h"
47 #include "content/browser/power_save_blocker_impl.h" 47 #include "content/browser/power_save_blocker_impl.h"
48 #include "content/browser/renderer_host/render_process_host_impl.h" 48 #include "content/browser/renderer_host/render_process_host_impl.h"
49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 49 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
50 #include "content/browser/renderer_host/render_view_host_impl.h" 50 #include "content/browser/renderer_host/render_view_host_impl.h"
51 #include "content/browser/renderer_host/render_widget_host_impl.h" 51 #include "content/browser/renderer_host/render_widget_host_impl.h"
52 #include "content/browser/renderer_host/render_widget_host_view_base.h" 52 #include "content/browser/renderer_host/render_widget_host_view_base.h"
53 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 53 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h"
54 #include "content/browser/site_instance_impl.h" 54 #include "content/browser/site_instance_impl.h"
55 #include "content/browser/wake_lock/wake_lock_dispatcher_host.h"
55 #include "content/browser/web_contents/web_contents_view_guest.h" 56 #include "content/browser/web_contents/web_contents_view_guest.h"
56 #include "content/browser/webui/generic_handler.h" 57 #include "content/browser/webui/generic_handler.h"
57 #include "content/browser/webui/web_ui_controller_factory_registry.h" 58 #include "content/browser/webui/web_ui_controller_factory_registry.h"
58 #include "content/browser/webui/web_ui_impl.h" 59 #include "content/browser/webui/web_ui_impl.h"
59 #include "content/common/browser_plugin/browser_plugin_constants.h" 60 #include "content/common/browser_plugin/browser_plugin_constants.h"
60 #include "content/common/browser_plugin/browser_plugin_messages.h" 61 #include "content/common/browser_plugin/browser_plugin_messages.h"
61 #include "content/common/frame_messages.h" 62 #include "content/common/frame_messages.h"
62 #include "content/common/image_messages.h" 63 #include "content/common/image_messages.h"
63 #include "content/common/input_messages.h" 64 #include "content/common/input_messages.h"
64 #include "content/common/ssl_status_serialization.h" 65 #include "content/common/ssl_status_serialization.h"
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 1240
1240 registrar_.Add(this, 1241 registrar_.Add(this,
1241 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1242 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1242 NotificationService::AllBrowserContextsAndSources()); 1243 NotificationService::AllBrowserContextsAndSources());
1243 1244
1244 screen_orientation_dispatcher_host_.reset( 1245 screen_orientation_dispatcher_host_.reset(
1245 new ScreenOrientationDispatcherHostImpl(this)); 1246 new ScreenOrientationDispatcherHostImpl(this));
1246 1247
1247 manifest_manager_host_.reset(new ManifestManagerHost(this)); 1248 manifest_manager_host_.reset(new ManifestManagerHost(this));
1248 1249
1250 wake_lock_dispatcher_host_.reset(new WakeLockDispatcherHost(this));
1251
1249 #if defined(OS_ANDROID) 1252 #if defined(OS_ANDROID)
1250 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1253 date_time_chooser_.reset(new DateTimeChooserAndroid());
1251 #endif 1254 #endif
1252 1255
1253 // BrowserPluginGuest::Init needs to be called after this WebContents has 1256 // BrowserPluginGuest::Init needs to be called after this WebContents has
1254 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above. 1257 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above.
1255 if (browser_plugin_guest_) 1258 if (browser_plugin_guest_)
1256 browser_plugin_guest_->Init(); 1259 browser_plugin_guest_->Init();
1257 1260
1258 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++) 1261 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
(...skipping 3327 matching lines...) Expand 10 before | Expand all | Expand 10 after
4586 node->render_manager()->ResumeResponseDeferredAtStart(); 4589 node->render_manager()->ResumeResponseDeferredAtStart();
4587 } 4590 }
4588 4591
4589 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4592 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4590 force_disable_overscroll_content_ = force_disable; 4593 force_disable_overscroll_content_ = force_disable;
4591 if (view_) 4594 if (view_)
4592 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4595 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4593 } 4596 }
4594 4597
4595 } // namespace content 4598 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698