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_PUBLIC_HEADLESS_WEB_CONTENTS_H_ | 5 #ifndef HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ |
6 #define HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ | 6 #define HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 virtual HeadlessDevToolsTarget* GetDevToolsTarget() = 0; | 70 virtual HeadlessDevToolsTarget* GetDevToolsTarget() = 0; |
71 | 71 |
72 // Close this page. |HeadlessWebContents| object will be destroyed. | 72 // Close this page. |HeadlessWebContents| object will be destroyed. |
73 virtual void Close() = 0; | 73 virtual void Close() = 0; |
74 | 74 |
75 // Returns the headless tab socket for JS -> C++ if one was created. | 75 // Returns the headless tab socket for JS -> C++ if one was created. |
76 virtual HeadlessTabSocket* GetHeadlessTabSocket() const = 0; | 76 virtual HeadlessTabSocket* GetHeadlessTabSocket() const = 0; |
77 | 77 |
78 // Returns the frame tree node id associated with the |devtools_agent_host_id| | 78 // Returns the frame tree node id associated with the |devtools_agent_host_id| |
79 // if any. | 79 // if any. |
80 // TODO(alexclarke): Remove this, it doesn't work as expected. | |
80 virtual bool GetFrameTreeNodeIdForDevToolsAgentHostId( | 81 virtual bool GetFrameTreeNodeIdForDevToolsAgentHostId( |
81 const std::string& devtools_agent_host_id, | 82 const std::string& devtools_agent_host_id, |
82 int* frame_tree_node_id) const = 0; | 83 int* frame_tree_node_id) const = 0; |
83 | 84 |
85 // Returns the devtools frame id corresponding to the |frame_tree_node_id|, if | |
86 // any. Note this only works after we have received the data from blink. | |
Sami
2017/04/24 19:54:05
nit: "after we have received the data from blink"
alex clarke (OOO till 29th)
2017/04/25 15:01:03
Done.
| |
87 virtual std::string GetDevToolsFrameIdForFrameTreeNodeId( | |
Sami
2017/04/24 19:54:05
Could we put this (and the new method on HeadlessW
alex clarke (OOO till 29th)
2017/04/25 15:01:03
Done.
| |
88 int frame_tree_node_id) const = 0; | |
89 | |
84 private: | 90 private: |
85 friend class HeadlessWebContentsImpl; | 91 friend class HeadlessWebContentsImpl; |
86 HeadlessWebContents() {} | 92 HeadlessWebContents() {} |
87 | 93 |
88 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents); | 94 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents); |
89 }; | 95 }; |
90 | 96 |
91 class HEADLESS_EXPORT HeadlessWebContents::Builder { | 97 class HEADLESS_EXPORT HeadlessWebContents::Builder { |
92 public: | 98 public: |
93 ~Builder(); | 99 ~Builder(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 gfx::Size window_size_; | 168 gfx::Size window_size_; |
163 std::list<MojoService> mojo_services_; | 169 std::list<MojoService> mojo_services_; |
164 bool create_tab_socket_ = false; | 170 bool create_tab_socket_ = false; |
165 | 171 |
166 DISALLOW_COPY_AND_ASSIGN(Builder); | 172 DISALLOW_COPY_AND_ASSIGN(Builder); |
167 }; | 173 }; |
168 | 174 |
169 } // namespace headless | 175 } // namespace headless |
170 | 176 |
171 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ | 177 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ |
OLD | NEW |