| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "web/DevToolsEmulator.h" | 5 #include "web/DevToolsEmulator.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/frame/VisualViewport.h" | 9 #include "core/frame/VisualViewport.h" |
| 10 #include "core/input/EventHandler.h" | 10 #include "core/input/EventHandler.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // we end up with enabling emulation in this case. | 312 // we end up with enabling emulation in this case. |
| 313 if (web_view_impl_->MainFrameImpl()) | 313 if (web_view_impl_->MainFrameImpl()) |
| 314 web_view_impl_->MainFrameImpl()->GetFrameView()->UpdateLayout(); | 314 web_view_impl_->MainFrameImpl()->GetFrameView()->UpdateLayout(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void DevToolsEmulator::DisableMobileEmulation() { | 317 void DevToolsEmulator::DisableMobileEmulation() { |
| 318 if (!emulate_mobile_enabled_) | 318 if (!emulate_mobile_enabled_) |
| 319 return; | 319 return; |
| 320 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled( | 320 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled( |
| 321 is_overlay_scrollbars_enabled_); | 321 is_overlay_scrollbars_enabled_); |
| 322 RuntimeEnabledFeatures::setOrientationEventEnabled( | |
| 323 is_orientation_event_enabled_); | |
| 324 RuntimeEnabledFeatures::setMobileLayoutThemeEnabled( | 322 RuntimeEnabledFeatures::setMobileLayoutThemeEnabled( |
| 325 is_mobile_layout_theme_enabled_); | 323 is_mobile_layout_theme_enabled_); |
| 326 ComputedStyle::InvalidateInitialStyle(); | 324 ComputedStyle::InvalidateInitialStyle(); |
| 327 web_view_impl_->GetPage()->GetSettings().SetViewportEnabled(false); | 325 web_view_impl_->GetPage()->GetSettings().SetViewportEnabled(false); |
| 328 web_view_impl_->GetPage()->GetSettings().SetViewportMetaEnabled(false); | 326 web_view_impl_->GetPage()->GetSettings().SetViewportMetaEnabled(false); |
| 329 web_view_impl_->GetPage()->GetVisualViewport().InitializeScrollbars(); | 327 web_view_impl_->GetPage()->GetVisualViewport().InitializeScrollbars(); |
| 330 web_view_impl_->GetSettings()->SetShrinksViewportContentToFit(false); | 328 web_view_impl_->GetSettings()->SetShrinksViewportContentToFit(false); |
| 331 web_view_impl_->GetPage()->GetSettings().SetTextAutosizingEnabled( | 329 web_view_impl_->GetPage()->GetSettings().SetTextAutosizingEnabled( |
| 332 embedder_text_autosizing_enabled_); | 330 embedder_text_autosizing_enabled_); |
| 333 web_view_impl_->GetPage()->GetSettings().SetPreferCompositingToLCDTextEnabled( | 331 web_view_impl_->GetPage()->GetSettings().SetPreferCompositingToLCDTextEnabled( |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 last_pinch_anchor_css_.reset(); | 548 last_pinch_anchor_css_.reset(); |
| 551 last_pinch_anchor_dip_.reset(); | 549 last_pinch_anchor_dip_.reset(); |
| 552 } | 550 } |
| 553 return true; | 551 return true; |
| 554 } | 552 } |
| 555 | 553 |
| 556 return false; | 554 return false; |
| 557 } | 555 } |
| 558 | 556 |
| 559 } // namespace blink | 557 } // namespace blink |
| OLD | NEW |