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

Side by Side Diff: headless/public/headless_web_contents.h

Issue 1906423003: headless: Remove old load observer API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update headless shell. 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 unified diff | Download patch
OLDNEW
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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "headless/public/headless_export.h" 11 #include "headless/public/headless_export.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace headless { 14 namespace headless {
15 class HeadlessDevToolsTarget; 15 class HeadlessDevToolsTarget;
16 16
17 // Class representing contents of a browser tab. Should be accessed from browser 17 // Class representing contents of a browser tab. Should be accessed from browser
18 // main thread. 18 // main thread.
19 class HEADLESS_EXPORT HeadlessWebContents { 19 class HEADLESS_EXPORT HeadlessWebContents {
20 public: 20 public:
21 virtual ~HeadlessWebContents() {} 21 virtual ~HeadlessWebContents() {}
22 22
23 // TODO(skyostil): Replace this with an equivalent client API.
24 class Observer { 23 class Observer {
25 public: 24 public:
26 // All the following notifications will be called on browser main thread. 25 // All the following notifications will be called on browser main thread.
27 virtual void DocumentOnLoadCompletedInMainFrame() {}
28 virtual void DidFinishNavigation(bool success) {}
29 26
30 // Indicates that this HeadlessWebContents instance is now ready to be 27 // Indicates that this HeadlessWebContents instance is now ready to be
31 // inspected using a HeadlessDevToolsClient. 28 // inspected using a HeadlessDevToolsClient.
32 // 29 //
33 // TODO(altimin): Support this event for pages that aren't created by us. 30 // TODO(altimin): Support this event for pages that aren't created by us.
34 virtual void DevToolsTargetReady() {} 31 virtual void DevToolsTargetReady() {}
35 32
36 protected: 33 protected:
37 Observer() {} 34 Observer() {}
38 virtual ~Observer() {} 35 virtual ~Observer() {}
(...skipping 18 matching lines...) Expand all
57 private: 54 private:
58 friend class HeadlessWebContentsImpl; 55 friend class HeadlessWebContentsImpl;
59 HeadlessWebContents() {} 56 HeadlessWebContents() {}
60 57
61 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents); 58 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents);
62 }; 59 };
63 60
64 } // namespace headless 61 } // namespace headless
65 62
66 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ 63 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « headless/lib/headless_web_contents_browsertest.cc ('k') | headless/test/headless_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698