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

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.h

Issue 2043603004: headless: Introduce a browser context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 6 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_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
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
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_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_url_request_context_getter.cc ('k') | headless/lib/browser/headless_web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698