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

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

Issue 10826025: Implement isRenderingVSynced on RenderWidget (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using webpreferences instead Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/view_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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "net/base/mime_util.h" 66 #include "net/base/mime_util.h"
67 #include "net/base/net_util.h" 67 #include "net/base/net_util.h"
68 #include "net/base/network_change_notifier.h" 68 #include "net/base/network_change_notifier.h"
69 #include "net/url_request/url_request_context_getter.h" 69 #include "net/url_request/url_request_context_getter.h"
70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" 70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
72 #include "ui/base/layout.h" 72 #include "ui/base/layout.h"
73 #include "ui/base/ui_base_switches.h" 73 #include "ui/base/ui_base_switches.h"
74 #include "ui/gfx/display.h" 74 #include "ui/gfx/display.h"
75 #include "ui/gfx/screen.h" 75 #include "ui/gfx/screen.h"
76 #include "ui/gl/gl_switches.h"
76 #include "webkit/glue/web_intent_data.h" 77 #include "webkit/glue/web_intent_data.h"
77 #include "webkit/glue/web_intent_service_data.h" 78 #include "webkit/glue/web_intent_service_data.h"
78 #include "webkit/glue/webpreferences.h" 79 #include "webkit/glue/webpreferences.h"
79 80
80 #if defined(OS_MACOSX) 81 #if defined(OS_MACOSX)
81 #include "base/mac/foundation_util.h" 82 #include "base/mac/foundation_util.h"
82 #include "ui/surface/io_surface_support_mac.h" 83 #include "ui/surface/io_surface_support_mac.h"
83 #endif 84 #endif
84 85
85 // Cross-Site Navigations 86 // Cross-Site Navigations
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 prefs.allow_file_access_from_file_urls = 457 prefs.allow_file_access_from_file_urls =
457 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 458 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
458 prefs.show_composited_layer_borders = 459 prefs.show_composited_layer_borders =
459 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 460 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
460 prefs.show_composited_layer_tree = 461 prefs.show_composited_layer_tree =
461 command_line.HasSwitch(switches::kShowCompositedLayerTree); 462 command_line.HasSwitch(switches::kShowCompositedLayerTree);
462 prefs.show_fps_counter = 463 prefs.show_fps_counter =
463 command_line.HasSwitch(switches::kShowFPSCounter); 464 command_line.HasSwitch(switches::kShowFPSCounter);
464 prefs.show_paint_rects = 465 prefs.show_paint_rects =
465 command_line.HasSwitch(switches::kShowPaintRects); 466 command_line.HasSwitch(switches::kShowPaintRects);
467 prefs.render_vsync_enabled =
468 !command_line.HasSwitch(switches::kDisableGpuVsync);
466 prefs.accelerated_compositing_enabled = 469 prefs.accelerated_compositing_enabled =
467 GpuProcessHost::gpu_enabled() && 470 GpuProcessHost::gpu_enabled() &&
468 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 471 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
469 prefs.force_compositing_mode = 472 prefs.force_compositing_mode =
470 command_line.HasSwitch(switches::kForceCompositingMode) && 473 command_line.HasSwitch(switches::kForceCompositingMode) &&
471 !command_line.HasSwitch(switches::kDisableForceCompositingMode); 474 !command_line.HasSwitch(switches::kDisableForceCompositingMode);
472 prefs.fixed_position_compositing_enabled = 475 prefs.fixed_position_compositing_enabled =
473 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); 476 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
474 prefs.accelerated_2d_canvas_enabled = 477 prefs.accelerated_2d_canvas_enabled =
475 GpuProcessHost::gpu_enabled() && 478 GpuProcessHost::gpu_enabled() &&
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 browser_plugin_host()->embedder_render_process_host(); 3129 browser_plugin_host()->embedder_render_process_host();
3127 *embedder_container_id = browser_plugin_host()->instance_id(); 3130 *embedder_container_id = browser_plugin_host()->instance_id();
3128 int embedder_process_id = 3131 int embedder_process_id =
3129 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3132 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3130 if (embedder_process_id != -1) { 3133 if (embedder_process_id != -1) {
3131 *embedder_channel_name = 3134 *embedder_channel_name =
3132 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3135 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3133 embedder_process_id); 3136 embedder_process_id);
3134 } 3137 }
3135 } 3138 }
OLDNEW
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698