OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 int exit_code) override; | 67 int exit_code) override; |
68 void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; | 68 void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; |
69 | 69 |
70 // content::WebContentsObserver implementation: | 70 // content::WebContentsObserver implementation: |
71 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; | 71 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; |
72 | 72 |
73 content::WebContents* web_contents() const; | 73 content::WebContents* web_contents() const; |
74 bool OpenURL(const GURL& url); | 74 bool OpenURL(const GURL& url); |
75 | 75 |
76 void Close() override; | 76 void Close() override; |
77 void Stop() override; | |
Sami
2016/11/23 18:11:32
We'll need this in devtools too, right? Should we
alex clarke (OOO till 29th)
2016/11/24 12:05:04
Yes we should add this to devtools.
| |
77 | 78 |
78 std::string GetDevToolsAgentHostId(); | 79 std::string GetDevToolsAgentHostId(); |
79 | 80 |
80 HeadlessBrowserImpl* browser() const; | 81 HeadlessBrowserImpl* browser() const; |
81 HeadlessBrowserContextImpl* browser_context() const; | 82 HeadlessBrowserContextImpl* browser_context() const; |
82 | 83 |
83 private: | 84 private: |
84 // Takes ownership of |web_contents|. | 85 // Takes ownership of |web_contents|. |
85 HeadlessWebContentsImpl(content::WebContents* web_contents, | 86 HeadlessWebContentsImpl(content::WebContents* web_contents, |
86 HeadlessBrowserContextImpl* browser_context); | 87 HeadlessBrowserContextImpl* browser_context); |
(...skipping 16 matching lines...) Expand all Loading... | |
103 std::unordered_map<HeadlessWebContents::Observer*, | 104 std::unordered_map<HeadlessWebContents::Observer*, |
104 std::unique_ptr<WebContentsObserverAdapter>>; | 105 std::unique_ptr<WebContentsObserverAdapter>>; |
105 ObserverMap observer_map_; | 106 ObserverMap observer_map_; |
106 | 107 |
107 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); | 108 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace headless | 111 } // namespace headless |
111 | 112 |
112 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 113 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |