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

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

Issue 1674263002: headless: Initial headless embedder API implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added navigation test. Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef HEADLESS_LIB_HEADLESS_WEB_CONTENTS_IMPL_H_
6 #define HEADLESS_LIB_HEADLESS_WEB_CONTENTS_IMPL_H_
7
8 #include "headless/public/headless_web_contents.h"
9
10 class SkBitmap;
11
12 namespace aura {
13 class WindowTreeHost;
14 }
15
16 namespace content {
17 class WebContents;
18 class BrowserContext;
19 }
20
21 namespace gfx {
22 class Size;
23 }
24
25 namespace headless {
26 class HeadlessServiceContext;
27
28 class HeadlessWebContentsImpl : public HeadlessWebContents {
29 public:
30 ~HeadlessWebContentsImpl() override;
31
32 // HeadlessWebContents implementation
33 HeadlessWebFrame* GetMainFrame() override;
34 Settings* GetSettings() override;
35 const Settings* GetSettings() const override;
36 content::NavigationController* GetController() override;
37 const content::NavigationController* GetController() const override;
38 std::string GetTitle() const override;
39 const GURL& GetVisibleURL() const override;
40 const GURL& GetLastCommittedURL() const override;
41 bool IsLoading() const override;
42 void SetViewportSize(const gfx::Size& size) override {}
43 void OpenURL(const GURL& url) override;
44 void TakeScreenshot(const ScreenshotCallback& callback) override;
45
46 content::WebContents* web_contents();
47
48 private:
49 friend class HeadlessBrowserImpl;
50
51 HeadlessWebContentsImpl(content::BrowserContext* context,
52 const gfx::Size& initial_size);
53
54 class Delegate;
55 scoped_ptr<Delegate> web_contents_delegate_;
56 scoped_ptr<content::WebContents> web_contents_;
57 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
58
59 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl);
60 };
61
62 } // namespace headless
63
64 #endif // HEADLESS_LIB_HEADLESS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698