| 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 "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" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(Observer); | 38 DISALLOW_COPY_AND_ASSIGN(Observer); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // Add or remove an observer to receive events from this WebContents. | 41 // Add or remove an observer to receive events from this WebContents. |
| 42 // |observer| must outlive this class or be removed prior to being destroyed. | 42 // |observer| must outlive this class or be removed prior to being destroyed. |
| 43 virtual void AddObserver(Observer* observer) = 0; | 43 virtual void AddObserver(Observer* observer) = 0; |
| 44 virtual void RemoveObserver(Observer* observer) = 0; | 44 virtual void RemoveObserver(Observer* observer) = 0; |
| 45 | 45 |
| 46 // Close this page. |HeadlessWebContents| object will be destroyed. |
| 47 virtual void Close() = 0; |
| 48 |
| 46 private: | 49 private: |
| 47 friend class HeadlessWebContentsImpl; | 50 friend class HeadlessWebContentsImpl; |
| 48 HeadlessWebContents() {} | 51 HeadlessWebContents() {} |
| 49 | 52 |
| 50 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents); | 53 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents); |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 } // namespace headless | 56 } // namespace headless |
| 54 | 57 |
| 55 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ | 58 #endif // HEADLESS_PUBLIC_HEADLESS_WEB_CONTENTS_H_ |
| OLD | NEW |