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_FRAME_IMPL_H_ |
| 6 #define HEADLESS_LIB_WEB_FRAME_IMPL_H_ |
| 7 |
| 8 #include "headless/public/web_frame.h" |
| 9 |
| 10 namespace base { |
| 11 class Value; |
| 12 } |
| 13 |
| 14 namespace blink { |
| 15 class WebLocalFrame; |
| 16 } |
| 17 |
| 18 namespace v8 { |
| 19 template <class T> class Local; |
| 20 class Value; |
| 21 } |
| 22 |
| 23 namespace headless { |
| 24 class WebDocument; |
| 25 |
| 26 class WebFrameImpl : public WebFrame { |
| 27 public: |
| 28 ~WebFrameImpl() override; |
| 29 |
| 30 // WebFrame implementation |
| 31 WebDocument document() override; |
| 32 void ExecuteScript(const std::string& source_code) override; |
| 33 void ExecuteScriptAndReturnValue( |
| 34 const std::string& source_code, |
| 35 const ScriptExecutionCallback& callback) override; |
| 36 |
| 37 private: |
| 38 WebFrameImpl(blink::WebLocalFrame* web_frame); |
| 39 |
| 40 friend class WebContentsImpl; |
| 41 |
| 42 class JavaScriptExecutionCallback; |
| 43 |
| 44 scoped_ptr<base::Value> ConvertV8ValueToBase( |
| 45 const v8::Local<v8::Value>& value); |
| 46 |
| 47 blink::WebLocalFrame* web_frame_; |
| 48 }; |
| 49 |
| 50 } // namespace headless |
| 51 |
| 52 #endif // HEADLESS_LIB_WEB_FRAME_IMPL_H_ |
OLD | NEW |