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 "content/browser/devtools/protocol/emulation_handler.h" | 5 #include "content/browser/devtools/protocol/emulation_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/browser/frame_host/render_frame_host_impl.h" | 11 #include "content/browser/frame_host/render_frame_host_impl.h" |
12 #include "content/browser/geolocation/geolocation_service_context.h" | |
13 #include "content/browser/renderer_host/render_widget_host_impl.h" | 12 #include "content/browser/renderer_host/render_widget_host_impl.h" |
14 #include "content/browser/web_contents/web_contents_impl.h" | 13 #include "content/browser/web_contents/web_contents_impl.h" |
15 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
16 #include "content/public/common/url_constants.h" | 15 #include "content/public/common/url_constants.h" |
| 16 #include "device/geolocation/geolocation_service_context.h" |
| 17 #include "device/geolocation/geoposition.h" |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 namespace devtools { | 20 namespace devtools { |
20 namespace emulation { | 21 namespace emulation { |
21 | 22 |
22 using Response = DevToolsProtocolClient::Response; | 23 using Response = DevToolsProtocolClient::Response; |
| 24 using GeolocationServiceContext = device::GeolocationServiceContext; |
| 25 using Geoposition = device::Geoposition; |
23 | 26 |
24 namespace { | 27 namespace { |
25 | 28 |
26 blink::WebScreenOrientationType WebScreenOrientationTypeFromString( | 29 blink::WebScreenOrientationType WebScreenOrientationTypeFromString( |
27 const std::string& type) { | 30 const std::string& type) { |
28 if (type == screen_orientation::kTypePortraitPrimary) | 31 if (type == screen_orientation::kTypePortraitPrimary) |
29 return blink::WebScreenOrientationPortraitPrimary; | 32 return blink::WebScreenOrientationPortraitPrimary; |
30 if (type == screen_orientation::kTypePortraitSecondary) | 33 if (type == screen_orientation::kTypePortraitSecondary) |
31 return blink::WebScreenOrientationPortraitSecondary; | 34 return blink::WebScreenOrientationPortraitSecondary; |
32 if (type == screen_orientation::kTypeLandscapePrimary) | 35 if (type == screen_orientation::kTypeLandscapePrimary) |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 widget_host->GetRoutingID(), device_emulation_params_)); | 274 widget_host->GetRoutingID(), device_emulation_params_)); |
272 } else { | 275 } else { |
273 widget_host->Send(new ViewMsg_DisableDeviceEmulation( | 276 widget_host->Send(new ViewMsg_DisableDeviceEmulation( |
274 widget_host->GetRoutingID())); | 277 widget_host->GetRoutingID())); |
275 } | 278 } |
276 } | 279 } |
277 | 280 |
278 } // namespace emulation | 281 } // namespace emulation |
279 } // namespace devtools | 282 } // namespace devtools |
280 } // namespace content | 283 } // namespace content |
OLD | NEW |