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_WEB_CONTENTS_IMPL_H_ |
| 6 #define HEADLESS_LIB_WEB_CONTENTS_IMPL_H_ |
| 7 |
| 8 #include "headless/public/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 |
| 27 class WebContentsImpl : public WebContents { |
| 28 public: |
| 29 ~WebContentsImpl() override; |
| 30 |
| 31 // WebContents implementation |
| 32 scoped_ptr<WebFrame> main_frame() override; |
| 33 void OpenURL(const GURL& url) override; |
| 34 void GetScreenshot(const ScreenshotCallback& callback) override; |
| 35 |
| 36 protected: |
| 37 content::WebContents* web_contents() override; |
| 38 |
| 39 private: |
| 40 friend class HeadlessBrowserImpl; |
| 41 |
| 42 WebContentsImpl(content::BrowserContext* context, |
| 43 const gfx::Size& initial_size); |
| 44 |
| 45 class Delegate; |
| 46 scoped_ptr<Delegate> web_contents_delegate_; |
| 47 |
| 48 scoped_ptr<content::WebContents> web_contents_; |
| 49 |
| 50 scoped_ptr<aura::WindowTreeHost> window_tree_host_; |
| 51 }; |
| 52 |
| 53 } // namespace headless |
| 54 |
| 55 #endif // HEADLESS_LIB_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |