OLD | NEW |
(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_ |
OLD | NEW |