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

Side by Side Diff: Source/WebCore/inspector/InspectorAgent.cpp

Issue 11366107: Merge 133052 - Web Inspector: frame chooser does not work on subsequent inspector open. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 namespace InspectorAgentState { 62 namespace InspectorAgentState {
63 static const char inspectorAgentEnabled[] = "inspectorAgentEnabled"; 63 static const char inspectorAgentEnabled[] = "inspectorAgentEnabled";
64 } 64 }
65 65
66 InspectorAgent::InspectorAgent(Page* page, InjectedScriptManager* injectedScript Manager, InstrumentingAgents* instrumentingAgents, InspectorState* state) 66 InspectorAgent::InspectorAgent(Page* page, InjectedScriptManager* injectedScript Manager, InstrumentingAgents* instrumentingAgents, InspectorState* state)
67 : InspectorBaseAgent<InspectorAgent>("Inspector", instrumentingAgents, state ) 67 : InspectorBaseAgent<InspectorAgent>("Inspector", instrumentingAgents, state )
68 , m_inspectedPage(page) 68 , m_inspectedPage(page)
69 , m_frontend(0) 69 , m_frontend(0)
70 , m_injectedScriptManager(injectedScriptManager) 70 , m_injectedScriptManager(injectedScriptManager)
71 , m_didCommitLoadFired(false)
72 { 71 {
73 ASSERT_ARG(page, page); 72 ASSERT_ARG(page, page);
74 m_instrumentingAgents->setInspectorAgent(this); 73 m_instrumentingAgents->setInspectorAgent(this);
75 } 74 }
76 75
77 InspectorAgent::~InspectorAgent() 76 InspectorAgent::~InspectorAgent()
78 { 77 {
79 m_instrumentingAgents->setInspectorAgent(0); 78 m_instrumentingAgents->setInspectorAgent(0);
80 } 79 }
81 80
(...skipping 13 matching lines...) Expand all
95 94
96 void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) 95 void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend)
97 { 96 {
98 m_frontend = inspectorFrontend; 97 m_frontend = inspectorFrontend;
99 } 98 }
100 99
101 void InspectorAgent::clearFrontend() 100 void InspectorAgent::clearFrontend()
102 { 101 {
103 m_pendingEvaluateTestCommands.clear(); 102 m_pendingEvaluateTestCommands.clear();
104 m_frontend = 0; 103 m_frontend = 0;
105 m_didCommitLoadFired = false;
106 m_injectedScriptManager->discardInjectedScripts(); 104 m_injectedScriptManager->discardInjectedScripts();
107 ErrorString error; 105 ErrorString error;
108 disable(&error); 106 disable(&error);
109 } 107 }
110 108
111 void InspectorAgent::didCommitLoad() 109 void InspectorAgent::didCommitLoad()
112 { 110 {
113 m_didCommitLoadFired = true;
114 m_injectedScriptManager->discardInjectedScripts(); 111 m_injectedScriptManager->discardInjectedScripts();
115 } 112 }
116 113
117 void InspectorAgent::enable(ErrorString*) 114 void InspectorAgent::enable(ErrorString*)
118 { 115 {
119 m_state->setBoolean(InspectorAgentState::inspectorAgentEnabled, true); 116 m_state->setBoolean(InspectorAgentState::inspectorAgentEnabled, true);
120 117
121 if (m_pendingInspectData.first) 118 if (m_pendingInspectData.first)
122 inspect(m_pendingInspectData.first, m_pendingInspectData.second); 119 inspect(m_pendingInspectData.first, m_pendingInspectData.second);
123 120
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 bool InspectorAgent::developerExtrasEnabled() const 178 bool InspectorAgent::developerExtrasEnabled() const
182 { 179 {
183 if (!m_inspectedPage) 180 if (!m_inspectedPage)
184 return false; 181 return false;
185 return m_inspectedPage->settings()->developerExtrasEnabled(); 182 return m_inspectedPage->settings()->developerExtrasEnabled();
186 } 183 }
187 184
188 } // namespace WebCore 185 } // namespace WebCore
189 186
190 #endif // ENABLE(INSPECTOR) 187 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorAgent.h ('k') | Source/WebCore/inspector/InspectorController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698