| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 43 #include "core/html/parser/TextResourceDecoder.h" | 43 #include "core/html/parser/TextResourceDecoder.h" |
| 44 #include "core/inspector/InspectorFrontendClient.h" | 44 #include "core/inspector/InspectorFrontendClient.h" |
| 45 #include "core/layout/LayoutTheme.h" | 45 #include "core/layout/LayoutTheme.h" |
| 46 #include "core/loader/FrameLoader.h" | 46 #include "core/loader/FrameLoader.h" |
| 47 #include "core/page/ContextMenuController.h" | 47 #include "core/page/ContextMenuController.h" |
| 48 #include "core/page/ContextMenuProvider.h" | 48 #include "core/page/ContextMenuProvider.h" |
| 49 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
| 50 #include "platform/ContextMenu.h" | 50 #include "platform/ContextMenu.h" |
| 51 #include "platform/ContextMenuItem.h" | 51 #include "platform/ContextMenuItem.h" |
| 52 #include "platform/HostWindow.h" | 52 #include "platform/PlatformChromeClient.h" |
| 53 #include "platform/ScriptForbiddenScope.h" | 53 #include "platform/ScriptForbiddenScope.h" |
| 54 #include "platform/SharedBuffer.h" | 54 #include "platform/SharedBuffer.h" |
| 55 #include "platform/UserGestureIndicator.h" | 55 #include "platform/UserGestureIndicator.h" |
| 56 #include "platform/loader/fetch/ResourceError.h" | 56 #include "platform/loader/fetch/ResourceError.h" |
| 57 #include "platform/loader/fetch/ResourceFetcher.h" | 57 #include "platform/loader/fetch/ResourceFetcher.h" |
| 58 #include "platform/loader/fetch/ResourceRequest.h" | 58 #include "platform/loader/fetch/ResourceRequest.h" |
| 59 #include "platform/loader/fetch/ResourceResponse.h" | 59 #include "platform/loader/fetch/ResourceResponse.h" |
| 60 | 60 |
| 61 namespace blink { | 61 namespace blink { |
| 62 | 62 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 152 } |
| 153 frontend_frame_ = nullptr; | 153 frontend_frame_ = nullptr; |
| 154 } | 154 } |
| 155 | 155 |
| 156 float DevToolsHost::zoomFactor() { | 156 float DevToolsHost::zoomFactor() { |
| 157 if (!frontend_frame_) | 157 if (!frontend_frame_) |
| 158 return 1; | 158 return 1; |
| 159 float zoom_factor = frontend_frame_->PageZoomFactor(); | 159 float zoom_factor = frontend_frame_->PageZoomFactor(); |
| 160 // Cancel the device scale factor applied to the zoom factor in | 160 // Cancel the device scale factor applied to the zoom factor in |
| 161 // use-zoom-for-dsf mode. | 161 // use-zoom-for-dsf mode. |
| 162 const HostWindow* host_window = frontend_frame_->View()->GetHostWindow(); | 162 const PlatformChromeClient* client = |
| 163 float window_to_viewport_ratio = host_window->WindowToViewportScalar(1.0f); | 163 frontend_frame_->View()->GetChromeClient(); |
| 164 float window_to_viewport_ratio = client->WindowToViewportScalar(1.0f); |
| 164 return zoom_factor / window_to_viewport_ratio; | 165 return zoom_factor / window_to_viewport_ratio; |
| 165 } | 166 } |
| 166 | 167 |
| 167 void DevToolsHost::setInjectedScriptForOrigin(const String& origin, | 168 void DevToolsHost::setInjectedScriptForOrigin(const String& origin, |
| 168 const String& script) { | 169 const String& script) { |
| 169 if (client_) | 170 if (client_) |
| 170 client_->SetInjectedScriptForOrigin(origin, script); | 171 client_->SetInjectedScriptForOrigin(origin, script); |
| 171 } | 172 } |
| 172 | 173 |
| 173 void DevToolsHost::copyText(const String& text) { | 174 void DevToolsHost::copyText(const String& text) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 228 |
| 228 bool DevToolsHost::isUnderTest() { | 229 bool DevToolsHost::isUnderTest() { |
| 229 return client_ && client_->IsUnderTest(); | 230 return client_ && client_->IsUnderTest(); |
| 230 } | 231 } |
| 231 | 232 |
| 232 bool DevToolsHost::isHostedMode() { | 233 bool DevToolsHost::isHostedMode() { |
| 233 return false; | 234 return false; |
| 234 } | 235 } |
| 235 | 236 |
| 236 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |