| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); | 514 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); |
| 515 prefs.allow_file_access_from_file_urls = | 515 prefs.allow_file_access_from_file_urls = |
| 516 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 516 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
| 517 | 517 |
| 518 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; | 518 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; |
| 519 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll)) | 519 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll)) |
| 520 prefs.accelerated_compositing_for_overflow_scroll_enabled = true; | 520 prefs.accelerated_compositing_for_overflow_scroll_enabled = true; |
| 521 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) | 521 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) |
| 522 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; | 522 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; |
| 523 | 523 |
| 524 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false; | |
| 525 if (command_line.HasSwitch( | |
| 526 switches::kEnableUniversalAcceleratedOverflowScroll)) | |
| 527 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = true; | |
| 528 if (command_line.HasSwitch( | |
| 529 switches::kDisableUniversalAcceleratedOverflowScroll)) | |
| 530 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false; | |
| 531 | |
| 532 prefs.accelerated_compositing_for_scrollable_frames_enabled = | 524 prefs.accelerated_compositing_for_scrollable_frames_enabled = |
| 533 command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames); | 525 command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames); |
| 534 prefs.composited_scrolling_for_frames_enabled = | 526 prefs.composited_scrolling_for_frames_enabled = |
| 535 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames); | 527 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames); |
| 536 prefs.show_paint_rects = | 528 prefs.show_paint_rects = |
| 537 command_line.HasSwitch(switches::kShowPaintRects); | 529 command_line.HasSwitch(switches::kShowPaintRects); |
| 538 prefs.accelerated_compositing_enabled = | 530 prefs.accelerated_compositing_enabled = |
| 539 GpuProcessHost::gpu_enabled() && | 531 GpuProcessHost::gpu_enabled() && |
| 540 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 532 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 541 prefs.force_compositing_mode = | 533 prefs.force_compositing_mode = |
| (...skipping 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3800 } | 3792 } |
| 3801 | 3793 |
| 3802 void WebContentsImpl::OnFrameRemoved( | 3794 void WebContentsImpl::OnFrameRemoved( |
| 3803 RenderViewHostImpl* render_view_host, | 3795 RenderViewHostImpl* render_view_host, |
| 3804 int64 frame_id) { | 3796 int64 frame_id) { |
| 3805 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3797 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3806 FrameDetached(render_view_host, frame_id)); | 3798 FrameDetached(render_view_host, frame_id)); |
| 3807 } | 3799 } |
| 3808 | 3800 |
| 3809 } // namespace content | 3801 } // namespace content |
| OLD | NEW |