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 93edc99d60de7d77285d06627ac7450f56c3ff65..2f6c710d6510839fb5007e5fcb6d2eb138d35df7 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; |
+ } |
+ std::string window_state() const { return window_state_; } |
Sami
2017/05/24 17:50:54
nit: return const ref
jzfeng
2017/05/25 01:10:50
Done.
|
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_; |
Sami
2017/05/24 17:50:54
Please zero-initialize this here or in the constru
jzfeng
2017/05/25 01:10:50
Done.
|
+ std::string window_state_; |
std::unique_ptr<content::WebContents> web_contents_; |
scoped_refptr<content::DevToolsAgentHost> agent_host_; |
std::list<MojoService> mojo_services_; |