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

Unified Diff: content/browser/devtools/protocol/page_handler.cc

Issue 2734123004: add a new set of commands to resize and position windows (Closed)
Patch Set: use browser window to support linux/window/mac Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | content/browser/devtools/protocol_config.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index c31a27ecd24d5e9ce7fe1173af498aea53808243..59a0456a3868dd1b3c4af4b31c2f65b93d131fa3 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -42,6 +42,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_util.h"
#include "ui/snapshot/snapshot.h"
+#include "ui/views/widget/widget.h"
#include "url/gurl.h"
namespace content {
@@ -594,5 +595,37 @@ Response PageHandler::StopLoading() {
return Response::OK();
}
+Response PageHandler::MaximizeWindow() {
+ return Response::Error("not implemented");
+}
+
+Response PageHandler::MinimizeWindow() {
+ return Response::Error("not implemented");
+}
+
+Response PageHandler::SetWindowFullscreen(Maybe<bool> fullscreen) {
dgozman 2017/03/16 01:45:59 Is this method an equivalent of fullscreen api, or
+ WebContentsImpl* web_contents = GetWebContents();
+ if (!web_contents)
+ return Response::InternalError();
+ views::Widget::GetWidgetForNativeWindow(
+ web_contents->GetTopLevelNativeWindow())
+ ->SetFullscreen(fullscreen.fromMaybe(true));
+ return Response::OK();
+}
+
+Response PageHandler::SetWindowBounds(Maybe<int> left,
+ Maybe<int> top,
+ Maybe<int> width,
+ Maybe<int> height) {
+ return Response::Error("not implemented");
+}
+
+Response PageHandler::GetWindowBounds(int* left,
+ int* top,
+ int* width,
+ int* height) {
+ return Response::Error("not implemented");
+}
+
} // namespace protocol
} // namespace content
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | content/browser/devtools/protocol_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698