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_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include "headless/public/headless_devtools_target.h" | 8 #include "headless/public/headless_devtools_target.h" |
9 #include "headless/public/headless_web_contents.h" | 9 #include "headless/public/headless_web_contents.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 class HeadlessDevToolsHostImpl; | 29 class HeadlessDevToolsHostImpl; |
30 class HeadlessBrowserImpl; | 30 class HeadlessBrowserImpl; |
31 class WebContentsObserverAdapter; | 31 class WebContentsObserverAdapter; |
32 | 32 |
33 class HeadlessWebContentsImpl : public HeadlessWebContents, | 33 class HeadlessWebContentsImpl : public HeadlessWebContents, |
34 public HeadlessDevToolsTarget { | 34 public HeadlessDevToolsTarget { |
35 public: | 35 public: |
36 ~HeadlessWebContentsImpl() override; | 36 ~HeadlessWebContentsImpl() override; |
37 | 37 |
38 static std::unique_ptr<HeadlessWebContentsImpl> Create( | 38 static std::unique_ptr<HeadlessWebContentsImpl> Create( |
39 content::BrowserContext* context, | 39 HeadlessWebContents::Builder* builder, |
40 aura::Window* parent_window, | 40 aura::Window* parent_window, |
41 const gfx::Size& initial_size, | |
42 HeadlessBrowserImpl* browser); | 41 HeadlessBrowserImpl* browser); |
43 | 42 |
44 // Takes ownership of |web_contents|. | 43 // Takes ownership of |web_contents|. |
45 static std::unique_ptr<HeadlessWebContentsImpl> CreateFromWebContents( | 44 static std::unique_ptr<HeadlessWebContentsImpl> CreateFromWebContents( |
46 content::WebContents* web_contents, | 45 content::WebContents* web_contents, |
47 HeadlessBrowserImpl* browser); | 46 HeadlessBrowserImpl* browser); |
48 | 47 |
49 // HeadlessWebContents implementation: | 48 // HeadlessWebContents implementation: |
50 void AddObserver(Observer* observer) override; | 49 void AddObserver(Observer* observer) override; |
51 void RemoveObserver(Observer* observer) override; | 50 void RemoveObserver(Observer* observer) override; |
(...skipping 27 matching lines...) Expand all Loading... |
79 std::unordered_map<HeadlessWebContents::Observer*, | 78 std::unordered_map<HeadlessWebContents::Observer*, |
80 std::unique_ptr<WebContentsObserverAdapter>>; | 79 std::unique_ptr<WebContentsObserverAdapter>>; |
81 ObserverMap observer_map_; | 80 ObserverMap observer_map_; |
82 | 81 |
83 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); | 82 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace headless | 85 } // namespace headless |
87 | 86 |
88 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 87 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |