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

Unified Diff: headless/lib/browser/headless_web_contents_impl.h

Issue 2896763002: Implement window management devtools commands for headless. (Closed)
Patch Set: nit and rebase Created 3 years, 7 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
Index: headless/lib/browser/headless_web_contents_impl.h
diff --git a/headless/lib/browser/headless_web_contents_impl.h b/headless/lib/browser/headless_web_contents_impl.h
index ef535f8651e69b59d10b2064ceace9d812edd793..59fd571b23beb6882820a8a2033b0f2b6ab696a2 100644
--- a/headless/lib/browser/headless_web_contents_impl.h
+++ b/headless/lib/browser/headless_web_contents_impl.h
@@ -100,6 +100,13 @@ class HEADLESS_EXPORT HeadlessWebContentsImpl
HeadlessWindowTreeHost* window_tree_host() const {
return window_tree_host_.get();
}
+ int window_id() const { return window_id_; }
+ void set_window_state(const std::string& state) {
+ DCHECK(state == "normal" || state == "minimized" || state == "maximized" ||
+ state == "fullscreen");
+ window_state_ = state;
+ }
+ const std::string& window_state() const { return window_state_; }
private:
// Takes ownership of |web_contents|.
@@ -112,6 +119,8 @@ class HEADLESS_EXPORT HeadlessWebContentsImpl
class Delegate;
std::unique_ptr<Delegate> web_contents_delegate_;
std::unique_ptr<HeadlessWindowTreeHost> window_tree_host_;
+ int window_id_ = 0;
+ std::string window_state_;
std::unique_ptr<content::WebContents> web_contents_;
scoped_refptr<content::DevToolsAgentHost> agent_host_;
std::list<MojoService> mojo_services_;
« no previous file with comments | « headless/lib/browser/headless_devtools_manager_delegate.cc ('k') | headless/lib/browser/headless_web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698