| 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 764dc5edbbee6fbc846b271b0060645062f932b3..94037e2ee82ba3b9a850ccd6edbb53dd16da11c6 100644
|
| --- a/content/browser/devtools/protocol/emulation_handler.cc
|
| +++ b/content/browser/devtools/protocol/emulation_handler.cc
|
| @@ -247,6 +247,10 @@ Response EmulationHandler::SetVisibleSize(int width, int height) {
|
| if (!widget_host)
|
| return Response::Error("Target does not support setVisibleSize");
|
|
|
| + if (width == 0)
|
| + width = widget_host->GetView()->GetViewBounds().width();
|
| + if (height == 0)
|
| + height = widget_host->GetView()->GetViewBounds().height();
|
| widget_host->GetView()->SetSize(gfx::Size(width, height));
|
| return Response::OK();
|
| }
|
|
|