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/renderer_host/render_widget_host_impl.cc

Issue 2751903003: DoubleTap Zoom support for Mobile Viewport pages (Closed)
Patch Set: Created 3 years, 9 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/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 std::vector<IPC::Message> messages_to_deliver_with_frame; 1815 std::vector<IPC::Message> messages_to_deliver_with_frame;
1816 messages_to_deliver_with_frame.swap(std::get<2>(param)); 1816 messages_to_deliver_with_frame.swap(std::get<2>(param));
1817 1817
1818 if (!ui::LatencyInfo::Verify(frame.metadata.latency_info, 1818 if (!ui::LatencyInfo::Verify(frame.metadata.latency_info,
1819 "RenderWidgetHostImpl::OnSwapCompositorFrame")) { 1819 "RenderWidgetHostImpl::OnSwapCompositorFrame")) {
1820 std::vector<ui::LatencyInfo>().swap(frame.metadata.latency_info); 1820 std::vector<ui::LatencyInfo>().swap(frame.metadata.latency_info);
1821 } 1821 }
1822 1822
1823 latency_tracker_.OnSwapCompositorFrame(&frame.metadata.latency_info); 1823 latency_tracker_.OnSwapCompositorFrame(&frame.metadata.latency_info);
1824 1824
1825 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); 1825 bool force_enable_zoom =
1826 RenderViewHost::From(this)->GetWebkitPreferences().force_enable_zoom;
1827 bool is_mobile_optimized =
1828 IsMobileOptimizedFrame(frame->metadata, force_enable_zoom);
1826 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); 1829 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized);
1827 if (touch_emulator_) 1830 if (touch_emulator_)
1828 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); 1831 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);
1829 1832
1830 // Ignore this frame if its content has already been unloaded. Source ID 1833 // Ignore this frame if its content has already been unloaded. Source ID
1831 // is always zero for an OOPIF because we are only concerned with displaying 1834 // is always zero for an OOPIF because we are only concerned with displaying
1832 // stale graphics on top-level frames. We accept frames that have a source ID 1835 // stale graphics on top-level frames. We accept frames that have a source ID
1833 // greater than |current_content_source_id_| because in some cases the first 1836 // greater than |current_content_source_id_| because in some cases the first
1834 // compositor frame can arrive before the navigation commit message that 1837 // compositor frame can arrive before the navigation commit message that
1835 // updates that value. 1838 // updates that value.
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
2547 // different from the receiver's. 2550 // different from the receiver's.
2548 file_system_file.url = 2551 file_system_file.url =
2549 GURL(storage::GetIsolatedFileSystemRootURIString( 2552 GURL(storage::GetIsolatedFileSystemRootURIString(
2550 file_system_url.origin(), filesystem_id, std::string()) 2553 file_system_url.origin(), filesystem_id, std::string())
2551 .append(register_name)); 2554 .append(register_name));
2552 file_system_file.filesystem_id = filesystem_id; 2555 file_system_file.filesystem_id = filesystem_id;
2553 } 2556 }
2554 } 2557 }
2555 2558
2556 } // namespace content 2559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/frame_metadata_util.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698