Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: Source/core/inspector/DevToolsHost.h

Issue 900543003: DevTools: do not abuse inspector controller for the front-end side plumbing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed initializer. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 22 matching lines...) Expand all
33 #include "wtf/RefCounted.h" 33 #include "wtf/RefCounted.h"
34 #include "wtf/Vector.h" 34 #include "wtf/Vector.h"
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 LocalFrame;
44 44
45 class DevToolsHost : public RefCountedWillBeGarbageCollectedFinalized<DevToolsHo st>, public ScriptWrappable { 45 class DevToolsHost : public RefCountedWillBeGarbageCollectedFinalized<DevToolsHo st>, public ScriptWrappable {
46 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
47 public: 47 public:
48 static PassRefPtrWillBeRawPtr<DevToolsHost> create(InspectorFrontendClient* client, Page* frontendPage) 48 static PassRefPtrWillBeRawPtr<DevToolsHost> create(InspectorFrontendClient* client, LocalFrame* frontendFrame)
49 { 49 {
50 return adoptRefWillBeNoop(new DevToolsHost(client, frontendPage)); 50 return adoptRefWillBeNoop(new DevToolsHost(client, frontendFrame));
51 } 51 }
52 52
53 ~DevToolsHost(); 53 ~DevToolsHost();
54 void trace(Visitor*); 54 void trace(Visitor*);
55 void disconnectClient(); 55 void disconnectClient();
56 56
57 float zoomFactor(); 57 float zoomFactor();
58 58
59 void setInjectedScriptForOrigin(const String& origin, const String& script); 59 void setInjectedScriptForOrigin(const String& origin, const String& script);
60 60
61 void copyText(const String& text); 61 void copyText(const String& text);
62 62
63 // Called from [Custom] implementations. 63 // Called from [Custom] implementations.
64 void showContextMenu(Event*, const Vector<ContextMenuItem>& items); 64 void showContextMenu(Event*, const Vector<ContextMenuItem>& items);
65 void showContextMenu(Page*, float x, float y, const Vector<ContextMenuItem>& items); 65 void showContextMenu(LocalFrame* targetFrame, float x, float y, const Vector <ContextMenuItem>& items);
66 void sendMessageToBackend(const String& message); 66 void sendMessageToBackend(const String& message);
67 void sendMessageToEmbedder(const String& message); 67 void sendMessageToEmbedder(const String& message);
68 68
69 String getSelectionBackgroundColor(); 69 String getSelectionBackgroundColor();
70 String getSelectionForegroundColor(); 70 String getSelectionForegroundColor();
71 71
72 bool isUnderTest(); 72 bool isUnderTest();
73 bool isHostedMode(); 73 bool isHostedMode();
74 74
75 Page* frontendPage() { return m_frontendPage; } 75 LocalFrame* frontendFrame() { return m_frontendFrame; }
76 76
77 void clearMenuProvider() { m_menuProvider = nullptr; } 77 void clearMenuProvider() { m_menuProvider = nullptr; }
78 78
79 private: 79 private:
80 DevToolsHost(InspectorFrontendClient*, Page* frontendPage); 80 DevToolsHost(InspectorFrontendClient*, LocalFrame* frontendFrame);
81 81
82 InspectorFrontendClient* m_client; 82 InspectorFrontendClient* m_client;
83 RawPtrWillBeMember<Page> m_frontendPage; 83 RawPtrWillBeMember<LocalFrame> m_frontendFrame;
84 RawPtrWillBeMember<FrontendMenuProvider> m_menuProvider; 84 RawPtrWillBeMember<FrontendMenuProvider> m_menuProvider;
85 }; 85 };
86 86
87 } // namespace blink 87 } // namespace blink
88 88
89 #endif // DevToolsHost_h 89 #endif // DevToolsHost_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp ('k') | Source/core/inspector/DevToolsHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698