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 23 matching lines...) Expand all Loading... |
34 class HEADLESS_EXPORT Observer { | 34 class HEADLESS_EXPORT Observer { |
35 public: | 35 public: |
36 // All the following notifications will be called on browser main thread. | 36 // All the following notifications will be called on browser main thread. |
37 | 37 |
38 // Indicates that this HeadlessWebContents instance is now ready to be | 38 // Indicates that this HeadlessWebContents instance is now ready to be |
39 // inspected using a HeadlessDevToolsClient. | 39 // inspected using a HeadlessDevToolsClient. |
40 // | 40 // |
41 // TODO(altimin): Support this event for pages that aren't created by us. | 41 // TODO(altimin): Support this event for pages that aren't created by us. |
42 virtual void DevToolsTargetReady() {} | 42 virtual void DevToolsTargetReady() {} |
43 | 43 |
| 44 // Indicates that a DevTools client attached to this HeadlessWebContents |
| 45 // instance. |
| 46 virtual void DevToolsClientAttached() {} |
| 47 |
| 48 // Indicates that a DevTools client detached from this HeadlessWebContents |
| 49 // instance. |
| 50 virtual void DevToolsClientDetached() {} |
| 51 |
44 // This method is invoked when the process of the observed RenderProcessHost | 52 // This method is invoked when the process of the observed RenderProcessHost |
45 // exits (either normally or with a crash). To determine if the process | 53 // exits (either normally or with a crash). To determine if the process |
46 // closed normally or crashed, examine the |status| parameter. | 54 // closed normally or crashed, examine the |status| parameter. |
47 // | 55 // |
48 // If |status| is TERMINATION_STATUS_LAUNCH_FAILED then |exit_code| will | 56 // If |status| is TERMINATION_STATUS_LAUNCH_FAILED then |exit_code| will |
49 // contain a platform specific launch failure error code. Otherwise, it will | 57 // contain a platform specific launch failure error code. Otherwise, it will |
50 // contain the exit code for the process. | 58 // contain the exit code for the process. |
51 virtual void RenderProcessExited(base::TerminationStatus status, | 59 virtual void RenderProcessExited(base::TerminationStatus status, |
52 int exit_code) {} | 60 int exit_code) {} |
53 | 61 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 gfx::Size window_size_; | 170 gfx::Size window_size_; |
163 std::list<MojoService> mojo_services_; | 171 std::list<MojoService> mojo_services_; |
164 bool create_tab_socket_ = false; | 172 bool create_tab_socket_ = false; |
165 | 173 |
166 DISALLOW_COPY_AND_ASSIGN(Builder); | 174 DISALLOW_COPY_AND_ASSIGN(Builder); |
167 }; | 175 }; |
168 | 176 |
169 } // namespace headless | 177 } // namespace headless |
170 | 178 |
171 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ | 179 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ |
OLD | NEW |