Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: content/browser/devtools/protocol/emulation_handler.cc

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 4 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 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"
12 #include "content/browser/renderer_host/render_widget_host_impl.h" 13 #include "content/browser/renderer_host/render_widget_host_impl.h"
13 #include "content/browser/web_contents/web_contents_impl.h" 14 #include "content/browser/web_contents/web_contents_impl.h"
14 #include "content/common/view_messages.h" 15 #include "content/common/view_messages.h"
15 #include "content/public/common/url_constants.h" 16 #include "content/public/common/url_constants.h"
16 #include "device/geolocation/geolocation_service_context.h"
17 #include "device/geolocation/geoposition.h"
18 17
19 namespace content { 18 namespace content {
20 namespace devtools { 19 namespace devtools {
21 namespace emulation { 20 namespace emulation {
22 21
23 using Response = DevToolsProtocolClient::Response; 22 using Response = DevToolsProtocolClient::Response;
24 using GeolocationServiceContext = device::GeolocationServiceContext;
25 using Geoposition = device::Geoposition;
26 23
27 namespace { 24 namespace {
28 25
29 blink::WebScreenOrientationType WebScreenOrientationTypeFromString( 26 blink::WebScreenOrientationType WebScreenOrientationTypeFromString(
30 const std::string& type) { 27 const std::string& type) {
31 if (type == screen_orientation::kTypePortraitPrimary) 28 if (type == screen_orientation::kTypePortraitPrimary)
32 return blink::WebScreenOrientationPortraitPrimary; 29 return blink::WebScreenOrientationPortraitPrimary;
33 if (type == screen_orientation::kTypePortraitSecondary) 30 if (type == screen_orientation::kTypePortraitSecondary)
34 return blink::WebScreenOrientationPortraitSecondary; 31 return blink::WebScreenOrientationPortraitSecondary;
35 if (type == screen_orientation::kTypeLandscapePrimary) 32 if (type == screen_orientation::kTypeLandscapePrimary)
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 widget_host->GetRoutingID(), device_emulation_params_)); 271 widget_host->GetRoutingID(), device_emulation_params_));
275 } else { 272 } else {
276 widget_host->Send(new ViewMsg_DisableDeviceEmulation( 273 widget_host->Send(new ViewMsg_DisableDeviceEmulation(
277 widget_host->GetRoutingID())); 274 widget_host->GetRoutingID()));
278 } 275 }
279 } 276 }
280 277
281 } // namespace emulation 278 } // namespace emulation
282 } // namespace devtools 279 } // namespace devtools
283 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698