| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class ContextMenuItem; | 39 class ContextMenuItem; |
| 40 class Event; | 40 class Event; |
| 41 class FrontendMenuProvider; | 41 class FrontendMenuProvider; |
| 42 class InspectorFrontendClient; | 42 class InspectorFrontendClient; |
| 43 class Page; | 43 class Page; |
| 44 | 44 |
| 45 class InspectorFrontendHost : public RefCounted<InspectorFrontendHost>, public S
criptWrappable { | 45 class InspectorFrontendHost : public RefCountedWillBeGarbageCollectedFinalized<I
nspectorFrontendHost>, public ScriptWrappable { |
| 46 public: | 46 public: |
| 47 static PassRefPtr<InspectorFrontendHost> create(InspectorFrontendClient* cli
ent, Page* frontendPage) | 47 static PassRefPtrWillBeRawPtr<InspectorFrontendHost> create(InspectorFronten
dClient* client, Page* frontendPage) |
| 48 { | 48 { |
| 49 return adoptRef(new InspectorFrontendHost(client, frontendPage)); | 49 return adoptRefWillBeNoop(new InspectorFrontendHost(client, frontendPage
)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 ~InspectorFrontendHost(); | 52 ~InspectorFrontendHost(); |
| 53 void trace(Visitor*); |
| 53 void disconnectClient(); | 54 void disconnectClient(); |
| 54 | 55 |
| 55 void setZoomFactor(float); | 56 void setZoomFactor(float); |
| 56 float zoomFactor(); | 57 float zoomFactor(); |
| 57 | 58 |
| 58 void setInjectedScriptForOrigin(const String& origin, const String& script); | 59 void setInjectedScriptForOrigin(const String& origin, const String& script); |
| 59 | 60 |
| 60 void copyText(const String& text); | 61 void copyText(const String& text); |
| 61 | 62 |
| 62 // Called from [Custom] implementations. | 63 // Called from [Custom] implementations. |
| 63 void showContextMenu(Event*, const Vector<ContextMenuItem>& items); | 64 void showContextMenu(Event*, const Vector<ContextMenuItem>& items); |
| 64 void showContextMenu(Page*, float x, float y, const Vector<ContextMenuItem>&
items); | 65 void showContextMenu(Page*, float x, float y, const Vector<ContextMenuItem>&
items); |
| 65 void sendMessageToBackend(const String& message); | 66 void sendMessageToBackend(const String& message); |
| 66 void sendMessageToEmbedder(const String& message); | 67 void sendMessageToEmbedder(const String& message); |
| 67 | 68 |
| 68 String getSelectionBackgroundColor(); | 69 String getSelectionBackgroundColor(); |
| 69 String getSelectionForegroundColor(); | 70 String getSelectionForegroundColor(); |
| 70 | 71 |
| 71 bool isUnderTest(); | 72 bool isUnderTest(); |
| 72 bool isHostedMode(); | 73 bool isHostedMode(); |
| 73 | 74 |
| 74 Page* frontendPage() { return m_frontendPage; } | 75 Page* frontendPage() { return m_frontendPage; } |
| 75 | 76 |
| 76 private: | 77 private: |
| 77 friend class FrontendMenuProvider; | 78 friend class FrontendMenuProvider; |
| 78 InspectorFrontendHost(InspectorFrontendClient* client, Page* frontendPage); | 79 InspectorFrontendHost(InspectorFrontendClient* client, Page* frontendPage); |
| 79 | 80 |
| 80 InspectorFrontendClient* m_client; | 81 InspectorFrontendClient* m_client; |
| 81 Page* m_frontendPage; | 82 RawPtrWillBeMember<Page> m_frontendPage; |
| 82 FrontendMenuProvider* m_menuProvider; | 83 FrontendMenuProvider* m_menuProvider; |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 } // namespace blink | 86 } // namespace blink |
| 86 | 87 |
| 87 #endif // !defined(InspectorFrontendHost_h) | 88 #endif // !defined(InspectorFrontendHost_h) |
| OLD | NEW |