OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebDevToolsFrontendImpl_h | 31 #ifndef WebDevToolsFrontendImpl_h |
32 #define WebDevToolsFrontendImpl_h | 32 #define WebDevToolsFrontendImpl_h |
33 | 33 |
34 #include "platform/Timer.h" | 34 #include "core/inspector/InspectorFrontendClient.h" |
35 #include "platform/heap/Handle.h" | |
35 #include "public/web/WebDevToolsFrontend.h" | 36 #include "public/web/WebDevToolsFrontend.h" |
36 #include "wtf/Deque.h" | |
37 #include "wtf/Forward.h" | |
38 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
39 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
40 | 39 |
41 namespace blink { | 40 namespace blink { |
42 | 41 |
43 class WebDevToolsClientDelegate; | 42 class InspectorFrontendHost; |
44 class WebViewImpl; | 43 class WebViewImpl; |
45 struct WebDevToolsMessageData; | |
46 | 44 |
47 class WebDevToolsFrontendImpl FINAL : public WebDevToolsFrontend { | 45 class WebDevToolsFrontendImpl FINAL : public WebDevToolsFrontend, public Inspect orFrontendClient { |
48 WTF_MAKE_NONCOPYABLE(WebDevToolsFrontendImpl); | 46 WTF_MAKE_NONCOPYABLE(WebDevToolsFrontendImpl); |
49 public: | 47 public: |
50 WebDevToolsFrontendImpl( | 48 WebDevToolsFrontendImpl(WebViewImpl*, WebDevToolsFrontendClient*); |
51 WebViewImpl*, | |
52 WebDevToolsFrontendClient*, | |
53 const String& applicationLocale); | |
54 virtual ~WebDevToolsFrontendImpl(); | 49 virtual ~WebDevToolsFrontendImpl(); |
55 | 50 |
56 // WebDevToolsFrontend implementation. | 51 // InspectorFrontendClient implementation. |
57 virtual void dispatchOnInspectorFrontend(const WebString& message) OVERRIDE; | 52 virtual void windowObjectCleared() OVERRIDE; |
53 | |
54 virtual void sendMessageToBackend(const WTF::String&) OVERRIDE; | |
55 | |
56 virtual void sendMessageToEmbedder(const WTF::String&) OVERRIDE; | |
57 | |
58 virtual bool isUnderTest() OVERRIDE; | |
59 | |
60 virtual void dispose() OVERRIDE; | |
58 | 61 |
59 private: | 62 private: |
60 class InspectorFrontendResumeObserver; | |
61 void resume(); | |
62 void maybeDispatch(Timer<WebDevToolsFrontendImpl>*); | |
63 void doDispatchOnInspectorFrontend(const WebString& message); | |
64 | |
65 WebViewImpl* m_webViewImpl; | 63 WebViewImpl* m_webViewImpl; |
66 WebDevToolsFrontendClient* m_client; | 64 WebDevToolsFrontendClient* m_client; |
67 String m_applicationLocale; | 65 RefPtrWillBePersistent<InspectorFrontendHost> m_frontendHost; |
sof
2014/08/18 14:13:49
I see why you need a Persistent<> here with Oilpan
dgozman
2014/08/18 15:03:40
I thought that Persistent is a supposed ownership
haraken
2014/08/18 15:06:04
Can we use WebPrivatePtr<InspectorFrontendHost> he
| |
68 OwnPtr<InspectorFrontendResumeObserver> m_inspectorFrontendResumeObserver; | |
69 Deque<WebString> m_messages; | |
70 Timer<WebDevToolsFrontendImpl> m_inspectorFrontendDispatchTimer; | |
71 }; | 66 }; |
72 | 67 |
73 } // namespace blink | 68 } // namespace blink |
74 | 69 |
75 #endif | 70 #endif |
OLD | NEW |