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

Unified Diff: chrome/test/chromedriver/chrome/chrome_desktop_impl.h

Issue 2826393002: use devtools command to do window management (Closed)
Patch Set: nit change Created 3 years, 8 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 | « no previous file | chrome/test/chromedriver/chrome/chrome_desktop_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/chrome_desktop_impl.h
diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h
index a5a8cccefdfdde7e0e66c1ea79565d1149c29074..c1f9974e2ea06486456be366539df5f6189ef311 100644
--- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h
+++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h
@@ -13,6 +13,7 @@
#include "base/compiler_specific.h"
#include "base/files/scoped_temp_dir.h"
#include "base/process/process.h"
+#include "base/values.h"
#include "chrome/test/chromedriver/chrome/chrome_impl.h"
namespace base {
@@ -66,7 +67,29 @@ class ChromeDesktopImpl : public ChromeImpl {
int GetNetworkConnection() const;
void SetNetworkConnection(int network_connection);
+ Status GetWindowPosition(const std::string& target_id, int* x, int* y);
+ Status GetWindowSize(const std::string& target_id, int* width, int* height);
+ Status SetWindowPosition(const std::string& target_id, int x, int y);
+ Status SetWindowSize(const std::string& target_id, int width, int height);
+ Status MaximizeWindow(const std::string& target_id);
+
private:
+ struct Window {
+ int id;
+ std::string state;
+ int left;
+ int top;
+ int width;
+ int height;
+ };
+ Status ParseWindow(std::unique_ptr<base::DictionaryValue> params,
+ Window* window);
+
+ Status GetWindow(const std::string& target_id, Window* window);
+ Status SetWindowState(int window_id, const std::string& window_state);
+ Status SetWindowBounds(const std::string& target_id,
+ std::unique_ptr<base::DictionaryValue> bounds);
+
base::Process process_;
base::CommandLine command_;
base::ScopedTempDir user_data_dir_;
« no previous file with comments | « no previous file | chrome/test/chromedriver/chrome/chrome_desktop_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698