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

Unified Diff: headless/public/headless_web_contents.h

Issue 1858403003: headless: Require the user to pass in an initial URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/public/headless_web_contents.h
diff --git a/headless/public/headless_web_contents.h b/headless/public/headless_web_contents.h
index e3cfbfb3ad86b98c5438497d0658746f8062f3a1..04ac953001d61b94e9d9bab75de4ea1a931ef0fa 100644
--- a/headless/public/headless_web_contents.h
+++ b/headless/public/headless_web_contents.h
@@ -22,9 +22,13 @@ class HEADLESS_EXPORT HeadlessWebContents {
// TODO(skyostil): Replace this with an equivalent client API.
class Observer {
public:
- // Will be called on browser thread.
- virtual void DocumentOnLoadCompletedInMainFrame() = 0;
- virtual void DidFinishNavigation(bool success) = 0;
+ // All the following notifications will be called on browser main thread.
+ virtual void DocumentOnLoadCompletedInMainFrame(){};
+ virtual void DidFinishNavigation(bool success){};
+
+ // After this event, this HeadlessWebContents instance is ready to be
+ // controlled using a DevTools client.
+ virtual void WebContentsReady(){};
protected:
Observer() {}
@@ -34,9 +38,6 @@ class HEADLESS_EXPORT HeadlessWebContents {
DISALLOW_COPY_AND_ASSIGN(Observer);
};
- // TODO(skyostil): Replace this with an equivalent client API.
- virtual bool OpenURL(const GURL& url) = 0;
-
// Add or remove an observer to receive events from this WebContents.
// |observer| must outlive this class or be removed prior to being destroyed.
virtual void AddObserver(Observer* observer) = 0;

Powered by Google App Engine
This is Rietveld 408576698