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

Side by Side Diff: Source/web/WebDevToolsFrontendImpl.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 // We should call maybeDispatch asynchronously here because we are not allow ed to update activeDOMObjects list in 115 // We should call maybeDispatch asynchronously here because we are not allow ed to update activeDOMObjects list in
116 // resume (See ExecutionContext::resumeActiveDOMObjects). 116 // resume (See ExecutionContext::resumeActiveDOMObjects).
117 if (!m_inspectorFrontendDispatchTimer.isActive()) 117 if (!m_inspectorFrontendDispatchTimer.isActive())
118 m_inspectorFrontendDispatchTimer.startOneShot(0, FROM_HERE); 118 m_inspectorFrontendDispatchTimer.startOneShot(0, FROM_HERE);
119 } 119 }
120 120
121 void WebDevToolsFrontendImpl::maybeDispatch(WebCore::Timer<WebDevToolsFrontendIm pl>*) 121 void WebDevToolsFrontendImpl::maybeDispatch(WebCore::Timer<WebDevToolsFrontendIm pl>*)
122 { 122 {
123 while (!m_messages.isEmpty()) { 123 while (!m_messages.isEmpty()) {
124 Document* document = m_webViewImpl->page()->mainFrame()->document(); 124 Document* document = m_webViewImpl->page()->deprecatedLocalMainFrame()-> document();
125 if (document->activeDOMObjectsAreSuspended()) { 125 if (document->activeDOMObjectsAreSuspended()) {
126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document)); 126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document));
127 return; 127 return;
128 } 128 }
129 m_inspectorFrontendResumeObserver.clear(); 129 m_inspectorFrontendResumeObserver.clear();
130 doDispatchOnInspectorFrontend(m_messages.takeFirst()); 130 doDispatchOnInspectorFrontend(m_messages.takeFirst());
131 } 131 }
132 } 132 }
133 133
134 void WebDevToolsFrontendImpl::doDispatchOnInspectorFrontend(const WebString& mes sage) 134 void WebDevToolsFrontendImpl::doDispatchOnInspectorFrontend(const WebString& mes sage)
(...skipping 23 matching lines...) Expand all
158 } 158 }
159 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction); 159 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction);
160 Vector< v8::Handle<v8::Value> > args; 160 Vector< v8::Handle<v8::Value> > args;
161 args.append(v8String(isolate, message)); 161 args.append(v8String(isolate, message));
162 v8::TryCatch tryCatch; 162 v8::TryCatch tryCatch;
163 tryCatch.SetVerbose(true); 163 tryCatch.SetVerbose(true);
164 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate); 164 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate);
165 } 165 }
166 166
167 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698