Changeset 90553 in webkit
- Timestamp:
- Jul 7, 2011 3:47:03 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90552 r90553 1 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Add support for clearing cache and cookies from network panel. 4 https://bugs.webkit.org/show_bug.cgi?id=63999 5 6 Added clear cache and cookies tests. Since no port currently supports 7 this functionality, the tests are disabled. 8 9 Reviewed by Pavel Feldman. 10 11 * http/tests/inspector/network/network-clear-cache-expected.txt: Added. 12 * http/tests/inspector/network/network-clear-cache.html-disabled: Added. 13 * http/tests/inspector/network/network-clear-cookies-expected.txt: Added. 14 * http/tests/inspector/network/network-clear-cookies.html-disabled: Added. 15 * http/tests/inspector/network/resources/random-cached.php: Added. 16 * http/tests/inspector/network/resources/set-cookie.php: Added. 17 1 18 2011-07-07 Shinya Kawanaka <shinyak@google.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r90552 r90553 1 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Add support for clearing cache and cookies from network panel. 4 https://bugs.webkit.org/show_bug.cgi?id=63999 5 6 Reviewed by Pavel Feldman. 7 8 * English.lproj/localizedStrings.js: 9 * inspector/Inspector.json: 10 * inspector/InspectorClient.h: 11 (WebCore::InspectorClient::clearBrowserCache): 12 (WebCore::InspectorClient::clearBrowserCookies): 13 * inspector/InspectorController.cpp: 14 (WebCore::InspectorController::InspectorController): 15 * inspector/InspectorResourceAgent.cpp: 16 (WebCore::InspectorResourceAgent::clearBrowserCache): 17 (WebCore::InspectorResourceAgent::clearBrowserCookies): 18 (WebCore::InspectorResourceAgent::InspectorResourceAgent): 19 * inspector/InspectorResourceAgent.h: 20 (WebCore::InspectorResourceAgent::create): 21 * inspector/front-end/NetworkPanel.js: 22 (WebInspector.NetworkPanel.prototype._contextMenu): 23 (WebInspector.NetworkPanel.prototype._clearBrowserCache): 24 (WebInspector.NetworkPanel.prototype._clearBrowserCookies): 25 * inspector/front-end/Settings.js: 26 1 27 2011-07-07 Shinya Kawanaka <shinyak@google.com> 2 28 -
trunk/Source/WebCore/inspector/Inspector.json
r90460 r90553 500 500 { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." } 501 501 ] 502 }, 503 { 504 "name": "clearBrowserCache", 505 "description": "Clears browser cache." 506 }, 507 { 508 "name": "clearBrowserCookies", 509 "description": "Clears browser cookies." 502 510 } 503 511 ], -
trunk/Source/WebCore/inspector/InspectorClient.h
r82810 r90553 53 53 virtual void updateInspectorStateCookie(const String&) { }; 54 54 55 virtual void clearBrowserCache() { } 56 virtual void clearBrowserCookies() { } 57 55 58 bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message); 56 59 }; -
trunk/Source/WebCore/inspector/InspectorController.cpp
r90389 r90553 102 102 , m_applicationCacheAgent(adoptPtr(new InspectorApplicationCacheAgent(m_instrumentingAgents.get(), page))) 103 103 #endif 104 , m_resourceAgent(InspectorResourceAgent::create(m_instrumentingAgents.get(), m_pageAgent.get(), m_state.get()))104 , m_resourceAgent(InspectorResourceAgent::create(m_instrumentingAgents.get(), m_pageAgent.get(), inspectorClient, m_state.get())) 105 105 , m_runtimeAgent(adoptPtr(new PageRuntimeAgent(m_injectedScriptManager.get(), page))) 106 106 , m_consoleAgent(adoptPtr(new InspectorConsoleAgent(m_instrumentingAgents.get(), m_inspectorAgent.get(), m_state.get(), m_injectedScriptManager.get(), m_domAgent.get()))) -
trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp
r90389 r90553 42 42 #include "FrameLoader.h" 43 43 #include "HTTPHeaderMap.h" 44 #include "InspectorClient.h" 44 45 #include "InspectorFrontend.h" 45 46 #include "InspectorFrontendChannel.h" … … 475 476 } 476 477 478 void InspectorResourceAgent::clearBrowserCache(ErrorString*) 479 { 480 m_client->clearBrowserCache(); 481 } 482 483 void InspectorResourceAgent::clearBrowserCookies(ErrorString*) 484 { 485 m_client->clearBrowserCookies(); 486 } 487 477 488 void InspectorResourceAgent::mainFrameNavigated(DocumentLoader* loader) 478 489 { … … 480 491 } 481 492 482 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, Inspector State* state)493 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorState* state) 483 494 : m_instrumentingAgents(instrumentingAgents) 484 495 , m_pageAgent(pageAgent) 496 , m_client(client) 485 497 , m_state(state) 486 498 , m_resourcesData(adoptPtr(new NetworkResourcesData())) -
trunk/Source/WebCore/inspector/InspectorResourceAgent.h
r90389 r90553 52 52 class Frame; 53 53 class InspectorArray; 54 class InspectorClient; 54 55 class InspectorFrontend; 55 56 class InspectorFrontendProxy; … … 75 76 class InspectorResourceAgent : public RefCounted<InspectorResourceAgent> { 76 77 public: 77 static PassRefPtr<InspectorResourceAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, Inspector State* state)78 static PassRefPtr<InspectorResourceAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorState* state) 78 79 { 79 return adoptRef(new InspectorResourceAgent(instrumentingAgents, pageAgent, state));80 return adoptRef(new InspectorResourceAgent(instrumentingAgents, pageAgent, client, state)); 80 81 } 81 82 … … 125 126 void clearCache(ErrorString*, const String* const optionalPreservedLoaderId); 126 127 128 void clearBrowserCache(ErrorString*); 129 void clearBrowserCookies(ErrorString*); 130 127 131 private: 128 InspectorResourceAgent(InstrumentingAgents*, InspectorPageAgent*, Inspector State*);132 InspectorResourceAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorClient*, InspectorState*); 129 133 130 134 bool isBackgroundEventsCollectionEnabled(); … … 134 138 InstrumentingAgents* m_instrumentingAgents; 135 139 InspectorPageAgent* m_pageAgent; 140 InspectorClient* m_client; 136 141 InspectorState* m_state; 137 142 InspectorFrontend::Network* m_frontend; -
trunk/Source/WebCore/inspector/front-end/NetworkPanel.js
r90393 r90553 994 994 } 995 995 996 if (Preferences.canClearCacheAndCookies) { 997 contextMenu.appendSeparator(); 998 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Clear browser cache" : "Clear Browser Cache"), this._clearBrowserCache.bind(this)); 999 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Clear browser cookies" : "Clear Browser Cookies"), this._clearBrowserCookies.bind(this)); 1000 } 1001 996 1002 contextMenu.show(event); 997 1003 }, … … 1038 1044 var har = (new WebInspector.HAREntry(resource)).build(); 1039 1045 InspectorFrontendHost.saveAs(resource.displayName + ".har", JSON.stringify(har)); 1046 }, 1047 1048 _clearBrowserCache: function(event) 1049 { 1050 if (confirm(WebInspector.UIString("Are you sure you want to clear browser cache?"))) 1051 NetworkAgent.clearBrowserCache(); 1052 }, 1053 1054 _clearBrowserCookies: function(event) 1055 { 1056 if (confirm(WebInspector.UIString("Are you sure you want to clear browser cookies?"))) 1057 NetworkAgent.clearBrowserCookies(); 1040 1058 }, 1041 1059 -
trunk/Source/WebCore/inspector/front-end/Settings.js
r90387 r90553 54 54 useLowerCaseMenuTitlesOnWindows: false, 55 55 canInspectWorkers: false, 56 canClearCacheAndCookies: false 56 57 } 57 58 -
trunk/Source/WebKit/chromium/ChangeLog
r90540 r90553 1 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Add support for clearing cache and cookies from network panel. 4 https://bugs.webkit.org/show_bug.cgi?id=63999 5 6 Reviewed by Pavel Feldman. 7 8 * public/WebDevToolsAgentClient.h: 9 (WebKit::WebDevToolsAgentClient::clearBrowserCache): 10 (WebKit::WebDevToolsAgentClient::clearBrowserCookies): 11 * src/InspectorClientImpl.cpp: 12 (WebKit::InspectorClientImpl::clearBrowserCache): 13 (WebKit::InspectorClientImpl::clearBrowserCookies): 14 * src/InspectorClientImpl.h: 15 * src/WebDevToolsAgentImpl.cpp: 16 (WebKit::WebDevToolsAgentImpl::clearBrowserCache): 17 (WebKit::WebDevToolsAgentImpl::clearBrowserCookies): 18 * src/WebDevToolsAgentImpl.h: 19 1 20 2011-07-06 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
r81758 r90553 60 60 virtual bool exposeV8DebuggerProtocol() { return false; } 61 61 62 virtual void clearBrowserCache() { } 63 virtual void clearBrowserCookies() { } 64 62 65 protected: 63 66 ~WebDevToolsAgentClient() { } -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp
r77617 r90553 95 95 } 96 96 97 void InspectorClientImpl::clearBrowserCache() 98 { 99 if (WebDevToolsAgentImpl* agent = devToolsAgent()) 100 agent->clearBrowserCache(); 101 } 102 103 void InspectorClientImpl::clearBrowserCookies() 104 { 105 if (WebDevToolsAgentImpl* agent = devToolsAgent()) 106 agent->clearBrowserCookies(); 107 } 108 97 109 WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent() 98 110 { -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.h
r77617 r90553 57 57 58 58 virtual void updateInspectorStateCookie(const WTF::String&); 59 60 virtual void clearBrowserCache(); 61 virtual void clearBrowserCookies(); 59 62 private: 60 63 WebDevToolsAgentImpl* devToolsAgent(); -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r90017 r90553 307 307 } 308 308 309 void WebDevToolsAgentImpl::clearBrowserCache() 310 { 311 m_client->clearBrowserCache(); 312 } 313 314 void WebDevToolsAgentImpl::clearBrowserCookies() 315 { 316 m_client->clearBrowserCookies(); 317 } 318 309 319 void WebDevToolsAgentImpl::setAgentIdentifierPrefix(const WebString& prefix) 310 320 { -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
r90017 r90553 92 92 virtual bool sendMessageToFrontend(const WTF::String&); 93 93 94 virtual void clearBrowserCache(); 95 virtual void clearBrowserCookies(); 96 94 97 int hostId() { return m_hostId; } 95 98
Note: See TracChangeset
for help on using the changeset viewer.