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

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

Issue 680193002: Plugin Power Saver: Implement size-based heuristic for peripheral content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 27 matching lines...) Expand all
38 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 38 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
39 #include "content/browser/geolocation/geolocation_service_context.h" 39 #include "content/browser/geolocation/geolocation_service_context.h"
40 #include "content/browser/host_zoom_map_impl.h" 40 #include "content/browser/host_zoom_map_impl.h"
41 #include "content/browser/loader/resource_dispatcher_host_impl.h" 41 #include "content/browser/loader/resource_dispatcher_host_impl.h"
42 #include "content/browser/manifest/manifest_manager_host.h" 42 #include "content/browser/manifest/manifest_manager_host.h"
43 #include "content/browser/media/audio_stream_monitor.h" 43 #include "content/browser/media/audio_stream_monitor.h"
44 #include "content/browser/media/capture/web_contents_audio_muter.h" 44 #include "content/browser/media/capture/web_contents_audio_muter.h"
45 #include "content/browser/media/midi_dispatcher_host.h" 45 #include "content/browser/media/midi_dispatcher_host.h"
46 #include "content/browser/message_port_message_filter.h" 46 #include "content/browser/message_port_message_filter.h"
47 #include "content/browser/message_port_service.h" 47 #include "content/browser/message_port_service.h"
48 #include "content/browser/plugin_content_origin_whitelist.h"
48 #include "content/browser/power_save_blocker_impl.h" 49 #include "content/browser/power_save_blocker_impl.h"
49 #include "content/browser/renderer_host/render_process_host_impl.h" 50 #include "content/browser/renderer_host/render_process_host_impl.h"
50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 51 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
51 #include "content/browser/renderer_host/render_view_host_impl.h" 52 #include "content/browser/renderer_host/render_view_host_impl.h"
52 #include "content/browser/renderer_host/render_widget_host_impl.h" 53 #include "content/browser/renderer_host/render_widget_host_impl.h"
53 #include "content/browser/renderer_host/render_widget_host_view_base.h" 54 #include "content/browser/renderer_host/render_widget_host_view_base.h"
54 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 55 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h"
55 #include "content/browser/site_instance_impl.h" 56 #include "content/browser/site_instance_impl.h"
56 #include "content/browser/web_contents/web_contents_view_guest.h" 57 #include "content/browser/web_contents/web_contents_view_guest.h"
57 #include "content/browser/webui/generic_handler.h" 58 #include "content/browser/webui/generic_handler.h"
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 CHECK(render_view_host_delegate_view_); 1173 CHECK(render_view_host_delegate_view_);
1173 CHECK(view_.get()); 1174 CHECK(view_.get());
1174 1175
1175 gfx::Size initial_size = params.initial_size; 1176 gfx::Size initial_size = params.initial_size;
1176 view_->CreateView(initial_size, params.context); 1177 view_->CreateView(initial_size, params.context);
1177 1178
1178 // Listen for whether our opener gets destroyed. 1179 // Listen for whether our opener gets destroyed.
1179 if (opener_) 1180 if (opener_)
1180 AddDestructionObserver(opener_); 1181 AddDestructionObserver(opener_);
1181 1182
1183 #if defined(ENABLE_PLUGINS)
1184 plugin_content_origin_whitelist_.reset(
1185 new PluginContentOriginWhitelist(this));
1186 #endif
1187
1182 registrar_.Add(this, 1188 registrar_.Add(this,
1183 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1189 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1184 NotificationService::AllBrowserContextsAndSources()); 1190 NotificationService::AllBrowserContextsAndSources());
1185 1191
1186 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); 1192 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this));
1187 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); 1193 midi_dispatcher_host_.reset(new MidiDispatcherHost(this));
1188 1194
1189 screen_orientation_dispatcher_host_.reset( 1195 screen_orientation_dispatcher_host_.reset(
1190 new ScreenOrientationDispatcherHostImpl(this)); 1196 new ScreenOrientationDispatcherHostImpl(this));
1191 1197
(...skipping 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 node->render_manager()->ResumeResponseDeferredAtStart(); 4335 node->render_manager()->ResumeResponseDeferredAtStart();
4330 } 4336 }
4331 4337
4332 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4338 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4333 force_disable_overscroll_content_ = force_disable; 4339 force_disable_overscroll_content_ = force_disable;
4334 if (view_) 4340 if (view_)
4335 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4341 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4336 } 4342 }
4337 4343
4338 } // namespace content 4344 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698