OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 void InspectorFrontendHost::disconnectClient() | 129 void InspectorFrontendHost::disconnectClient() |
130 { | 130 { |
131 m_client = 0; | 131 m_client = 0; |
132 if (m_menuProvider) | 132 if (m_menuProvider) |
133 m_menuProvider->disconnect(); | 133 m_menuProvider->disconnect(); |
134 m_frontendPage = 0; | 134 m_frontendPage = 0; |
135 } | 135 } |
136 | 136 |
137 void InspectorFrontendHost::setZoomFactor(float zoom) | 137 void InspectorFrontendHost::setZoomFactor(float zoom) |
138 { | 138 { |
139 m_frontendPage->mainFrame()->setPageAndTextZoomFactors(zoom, 1); | 139 m_frontendPage->deprecatedLocalMainFrame()->setPageAndTextZoomFactors(zoom,
1); |
140 } | 140 } |
141 | 141 |
142 float InspectorFrontendHost::zoomFactor() | 142 float InspectorFrontendHost::zoomFactor() |
143 { | 143 { |
144 return m_frontendPage->mainFrame()->pageZoomFactor(); | 144 return m_frontendPage->deprecatedLocalMainFrame()->pageZoomFactor(); |
145 } | 145 } |
146 | 146 |
147 void InspectorFrontendHost::setInjectedScriptForOrigin(const String& origin, con
st String& script) | 147 void InspectorFrontendHost::setInjectedScriptForOrigin(const String& origin, con
st String& script) |
148 { | 148 { |
149 m_frontendPage->inspectorController().setInjectedScriptForOrigin(origin, scr
ipt); | 149 m_frontendPage->inspectorController().setInjectedScriptForOrigin(origin, scr
ipt); |
150 } | 150 } |
151 | 151 |
152 void InspectorFrontendHost::copyText(const String& text) | 152 void InspectorFrontendHost::copyText(const String& text) |
153 { | 153 { |
154 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar
tReplace); | 154 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar
tReplace); |
(...skipping 27 matching lines...) Expand all Loading... |
182 if (m_client) | 182 if (m_client) |
183 m_client->sendMessageToEmbedder(escapeUnicodeNonCharacters(message)); | 183 m_client->sendMessageToEmbedder(escapeUnicodeNonCharacters(message)); |
184 } | 184 } |
185 | 185 |
186 void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMe
nuItem>& items) | 186 void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMe
nuItem>& items) |
187 { | 187 { |
188 if (!event) | 188 if (!event) |
189 return; | 189 return; |
190 | 190 |
191 ASSERT(m_frontendPage); | 191 ASSERT(m_frontendPage); |
192 ScriptState* frontendScriptState = ScriptState::forMainWorld(m_frontendPage-
>mainFrame()); | 192 ScriptState* frontendScriptState = ScriptState::forMainWorld(m_frontendPage-
>deprecatedLocalMainFrame()); |
193 ScriptValue frontendApiObject = frontendScriptState->getFromGlobalObject("In
spectorFrontendAPI"); | 193 ScriptValue frontendApiObject = frontendScriptState->getFromGlobalObject("In
spectorFrontendAPI"); |
194 ASSERT(frontendApiObject.isObject()); | 194 ASSERT(frontendApiObject.isObject()); |
195 RefPtr<FrontendMenuProvider> menuProvider = FrontendMenuProvider::create(thi
s, frontendApiObject, items); | 195 RefPtr<FrontendMenuProvider> menuProvider = FrontendMenuProvider::create(thi
s, frontendApiObject, items); |
196 m_frontendPage->contextMenuController().showContextMenu(event, menuProvider)
; | 196 m_frontendPage->contextMenuController().showContextMenu(event, menuProvider)
; |
197 m_menuProvider = menuProvider.get(); | 197 m_menuProvider = menuProvider.get(); |
198 } | 198 } |
199 | 199 |
200 String InspectorFrontendHost::getSelectionBackgroundColor() | 200 String InspectorFrontendHost::getSelectionBackgroundColor() |
201 { | 201 { |
202 return RenderTheme::theme().activeSelectionBackgroundColor().serialized(); | 202 return RenderTheme::theme().activeSelectionBackgroundColor().serialized(); |
203 } | 203 } |
204 | 204 |
205 String InspectorFrontendHost::getSelectionForegroundColor() | 205 String InspectorFrontendHost::getSelectionForegroundColor() |
206 { | 206 { |
207 return RenderTheme::theme().activeSelectionForegroundColor().serialized(); | 207 return RenderTheme::theme().activeSelectionForegroundColor().serialized(); |
208 } | 208 } |
209 | 209 |
210 bool InspectorFrontendHost::isUnderTest() | 210 bool InspectorFrontendHost::isUnderTest() |
211 { | 211 { |
212 return m_client && m_client->isUnderTest(); | 212 return m_client && m_client->isUnderTest(); |
213 } | 213 } |
214 | 214 |
215 } // namespace WebCore | 215 } // namespace WebCore |
OLD | NEW |