| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/frame/VisualViewport.h" | 5 #include "core/frame/VisualViewport.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/frame/BrowserControls.h" | 10 #include "core/frame/BrowserControls.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 152 } |
| 153 | 153 |
| 154 void RegisterMockedHttpURLLoad(const std::string& url, | 154 void RegisterMockedHttpURLLoad(const std::string& url, |
| 155 const std::string& fileName) { | 155 const std::string& fileName) { |
| 156 URLTestHelpers::RegisterMockedURLLoad( | 156 URLTestHelpers::RegisterMockedURLLoad( |
| 157 ToKURL(url), | 157 ToKURL(url), |
| 158 blink::testing::WebTestDataPath(WebString::FromUTF8(fileName))); | 158 blink::testing::WebTestDataPath(WebString::FromUTF8(fileName))); |
| 159 } | 159 } |
| 160 | 160 |
| 161 WebViewBase* WebViewImpl() const { return helper_.WebView(); } | 161 WebViewBase* WebViewImpl() const { return helper_.WebView(); } |
| 162 LocalFrame* GetFrame() const { | 162 LocalFrame* GetFrame() const { return helper_.LocalMainFrame()->GetFrame(); } |
| 163 return helper_.WebView()->MainFrameImpl()->GetFrame(); | |
| 164 } | |
| 165 | 163 |
| 166 static void ConfigureSettings(WebSettings* settings) { | 164 static void ConfigureSettings(WebSettings* settings) { |
| 167 settings->SetJavaScriptEnabled(true); | 165 settings->SetJavaScriptEnabled(true); |
| 168 settings->SetPreferCompositingToLCDTextEnabled(true); | 166 settings->SetPreferCompositingToLCDTextEnabled(true); |
| 169 } | 167 } |
| 170 | 168 |
| 171 static void ConfigureAndroidSettings(WebSettings* settings) { | 169 static void ConfigureAndroidSettings(WebSettings* settings) { |
| 172 ConfigureSettings(settings); | 170 ConfigureSettings(settings); |
| 173 settings->SetViewportEnabled(true); | 171 settings->SetViewportEnabled(true); |
| 174 settings->SetViewportMetaEnabled(true); | 172 settings->SetViewportMetaEnabled(true); |
| (...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 " margin: 0px;" | 2420 " margin: 0px;" |
| 2423 " }" | 2421 " }" |
| 2424 " div { height:110vh; width: 110vw; }" | 2422 " div { height:110vh; width: 110vw; }" |
| 2425 "</style>" | 2423 "</style>" |
| 2426 "<div></div>", | 2424 "<div></div>", |
| 2427 base_url); | 2425 base_url); |
| 2428 } | 2426 } |
| 2429 | 2427 |
| 2430 } // namespace | 2428 } // namespace |
| 2431 } // namespace blink | 2429 } // namespace blink |
| OLD | NEW |