Index: content/browser/devtools/protocol/emulation_handler.cc |
diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc |
index 6b124e37131dc66c0de5ec67f551117388bf4e4f..f5945d713214f6604c2bf9640739f85847f7d62b 100644 |
--- a/content/browser/devtools/protocol/emulation_handler.cc |
+++ b/content/browser/devtools/protocol/emulation_handler.cc |
@@ -22,19 +22,6 @@ |
using Response = DevToolsProtocolClient::Response; |
namespace { |
- |
-blink::WebScreenOrientationType WebScreenOrientationTypeFromString( |
- const std::string& type) { |
- if (type == screen_orientation::kTypePortraitPrimary) |
- return blink::WebScreenOrientationPortraitPrimary; |
- if (type == screen_orientation::kTypePortraitSecondary) |
- return blink::WebScreenOrientationPortraitSecondary; |
- if (type == screen_orientation::kTypeLandscapePrimary) |
- return blink::WebScreenOrientationLandscapePrimary; |
- if (type == screen_orientation::kTypeLandscapeSecondary) |
- return blink::WebScreenOrientationLandscapeSecondary; |
- return blink::WebScreenOrientationUndefined; |
-} |
ui::GestureProviderConfigType TouchEmulationConfigurationToType( |
const std::string& protocol_value) { |
@@ -145,11 +132,9 @@ |
const int* screen_width, |
const int* screen_height, |
const int* position_x, |
- const int* position_y, |
- const scoped_ptr<base::DictionaryValue>& screen_orientation) { |
+ const int* position_y) { |
const static int max_size = 10000000; |
const static double max_scale = 10; |
- const static int max_orientation_angle = 360; |
if (!host_) |
return Response::InternalError("Could not connect to view"); |
@@ -181,30 +166,6 @@ |
return Response::InvalidParams( |
"scale must be positive, not greater than " + |
base::DoubleToString(max_scale)); |
- } |
- |
- blink::WebScreenOrientationType orientationType = |
- blink::WebScreenOrientationUndefined; |
- int orientationAngle = 0; |
- if (screen_orientation) { |
- std::string orientationTypeString; |
- if (!screen_orientation->GetString("type", &orientationTypeString)) { |
- return Response::InvalidParams( |
- "Screen orientation type must be a string"); |
- } |
- orientationType = WebScreenOrientationTypeFromString(orientationTypeString); |
- if (orientationType == blink::WebScreenOrientationUndefined) |
- return Response::InvalidParams("Invalid screen orientation type value"); |
- |
- if (!screen_orientation->GetInteger("angle", &orientationAngle)) { |
- return Response::InvalidParams( |
- "Screen orientation angle must be a number"); |
- } |
- if (orientationAngle < 0 || orientationAngle >= max_orientation_angle) { |
- return Response::InvalidParams( |
- "Screen orientation angle must be non-negative, less than " + |
- base::IntToString(max_orientation_angle)); |
- } |
} |
blink::WebDeviceEmulationParams params; |
@@ -221,8 +182,6 @@ |
params.offset = blink::WebFloatPoint( |
optional_offset_x ? *optional_offset_x : 0.f, |
optional_offset_y ? *optional_offset_y : 0.f); |
- params.screenOrientationType = orientationType; |
- params.screenOrientationAngle = orientationAngle; |
if (device_emulation_enabled_ && params == device_emulation_params_) |
return Response::OK(); |