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

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, 3 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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"
55 #include "content/browser/renderer_host/render_view_host_impl.h" 55 #include "content/browser/renderer_host/render_view_host_impl.h"
56 #include "content/browser/renderer_host/render_widget_host_impl.h" 56 #include "content/browser/renderer_host/render_widget_host_impl.h"
57 #include "content/browser/renderer_host/render_widget_host_view_base.h" 57 #include "content/browser/renderer_host/render_widget_host_view_base.h"
58 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 58 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h"
59 #include "content/browser/site_instance_impl.h" 59 #include "content/browser/site_instance_impl.h"
60 #include "content/browser/wake_lock/wake_lock_service_context.h"
60 #include "content/browser/web_contents/web_contents_view_guest.h" 61 #include "content/browser/web_contents/web_contents_view_guest.h"
61 #include "content/browser/webui/generic_handler.h" 62 #include "content/browser/webui/generic_handler.h"
62 #include "content/browser/webui/web_ui_controller_factory_registry.h" 63 #include "content/browser/webui/web_ui_controller_factory_registry.h"
63 #include "content/browser/webui/web_ui_impl.h" 64 #include "content/browser/webui/web_ui_impl.h"
64 #include "content/common/browser_plugin/browser_plugin_constants.h" 65 #include "content/common/browser_plugin/browser_plugin_constants.h"
65 #include "content/common/browser_plugin/browser_plugin_messages.h" 66 #include "content/common/browser_plugin/browser_plugin_messages.h"
66 #include "content/common/frame_messages.h" 67 #include "content/common/frame_messages.h"
67 #include "content/common/input_messages.h" 68 #include "content/common/input_messages.h"
68 #include "content/common/site_isolation_policy.h" 69 #include "content/common/site_isolation_policy.h"
69 #include "content/common/ssl_status_serialization.h" 70 #include "content/common/ssl_status_serialization.h"
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 1383
1383 registrar_.Add(this, 1384 registrar_.Add(this,
1384 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1385 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1385 NotificationService::AllBrowserContextsAndSources()); 1386 NotificationService::AllBrowserContextsAndSources());
1386 1387
1387 screen_orientation_dispatcher_host_.reset( 1388 screen_orientation_dispatcher_host_.reset(
1388 new ScreenOrientationDispatcherHostImpl(this)); 1389 new ScreenOrientationDispatcherHostImpl(this));
1389 1390
1390 manifest_manager_host_.reset(new ManifestManagerHost(this)); 1391 manifest_manager_host_.reset(new ManifestManagerHost(this));
1391 1392
1393 wake_lock_service_context_.reset(new WakeLockServiceContext(this));
1394
1392 #if defined(OS_ANDROID) 1395 #if defined(OS_ANDROID)
1393 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1396 date_time_chooser_.reset(new DateTimeChooserAndroid());
1394 #endif 1397 #endif
1395 1398
1396 // BrowserPluginGuest::Init needs to be called after this WebContents has 1399 // BrowserPluginGuest::Init needs to be called after this WebContents has
1397 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above. 1400 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above.
1398 if (browser_plugin_guest_) 1401 if (browser_plugin_guest_)
1399 browser_plugin_guest_->Init(); 1402 browser_plugin_guest_->Init();
1400 1403
1401 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++) 1404 for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
(...skipping 3213 matching lines...) Expand 10 before | Expand all | Expand 10 after
4615 player_map->erase(it); 4618 player_map->erase(it);
4616 } 4619 }
4617 4620
4618 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4621 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4619 force_disable_overscroll_content_ = force_disable; 4622 force_disable_overscroll_content_ = force_disable;
4620 if (view_) 4623 if (view_)
4621 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4624 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4622 } 4625 }
4623 4626
4624 } // namespace content 4627 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698