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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2591803002: NOT FOR LANDING: Thread the needle through all webmodules.
Patch Set: AddEventListener sketched out. Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 #include "web/SharedWorkerRepositoryClientImpl.h" 224 #include "web/SharedWorkerRepositoryClientImpl.h"
225 #include "web/SuspendableScriptExecutor.h" 225 #include "web/SuspendableScriptExecutor.h"
226 #include "web/TextFinder.h" 226 #include "web/TextFinder.h"
227 #include "web/WebAssociatedURLLoaderImpl.h" 227 #include "web/WebAssociatedURLLoaderImpl.h"
228 #include "web/WebDataSourceImpl.h" 228 #include "web/WebDataSourceImpl.h"
229 #include "web/WebDevToolsAgentImpl.h" 229 #include "web/WebDevToolsAgentImpl.h"
230 #include "web/WebFrameWidgetImpl.h" 230 #include "web/WebFrameWidgetImpl.h"
231 #include "web/WebPluginContainerImpl.h" 231 #include "web/WebPluginContainerImpl.h"
232 #include "web/WebRemoteFrameImpl.h" 232 #include "web/WebRemoteFrameImpl.h"
233 #include "web/WebViewImpl.h" 233 #include "web/WebViewImpl.h"
234 #include "web/agent/sample/sample_agent.h"
235 #include "web/api/frame.h"
234 #include "wtf/CurrentTime.h" 236 #include "wtf/CurrentTime.h"
235 #include "wtf/HashMap.h" 237 #include "wtf/HashMap.h"
236 #include "wtf/PtrUtil.h" 238 #include "wtf/PtrUtil.h"
237 239
238 namespace blink { 240 namespace blink {
239 241
240 static int frameCount = 0; 242 static int frameCount = 0;
241 243
242 static HeapVector<ScriptSourceCode> createSourcesVector( 244 static HeapVector<ScriptSourceCode> createSourcesVector(
243 const WebScriptSource* sourcesIn, 245 const WebScriptSource* sourcesIn,
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 void WebLocalFrameImpl::setDevToolsAgentClient( 1922 void WebLocalFrameImpl::setDevToolsAgentClient(
1921 WebDevToolsAgentClient* devToolsClient) { 1923 WebDevToolsAgentClient* devToolsClient) {
1922 DCHECK(devToolsClient); 1924 DCHECK(devToolsClient);
1923 m_devToolsAgent = WebDevToolsAgentImpl::create(this, devToolsClient); 1925 m_devToolsAgent = WebDevToolsAgentImpl::create(this, devToolsClient);
1924 } 1926 }
1925 1927
1926 WebDevToolsAgent* WebLocalFrameImpl::devToolsAgent() { 1928 WebDevToolsAgent* WebLocalFrameImpl::devToolsAgent() {
1927 return m_devToolsAgent.get(); 1929 return m_devToolsAgent.get();
1928 } 1930 }
1929 1931
1932 void WebLocalFrameImpl::startAgents() {
1933 // TODO(dglazkov): Store all agents for the lifetime of this instance.
1934 if (!frame())
1935 return;
1936 new web::SampleAgent(new web::Frame(frame()));
1937 }
1938
1930 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() { 1939 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() {
1931 // This can't use the LocalFrame::localFrameRoot, since it may be called 1940 // This can't use the LocalFrame::localFrameRoot, since it may be called
1932 // when the WebLocalFrame exists but the core LocalFrame does not. 1941 // when the WebLocalFrame exists but the core LocalFrame does not.
1933 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. 1942 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place.
1934 WebLocalFrameImpl* localRoot = this; 1943 WebLocalFrameImpl* localRoot = this;
1935 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame()) 1944 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame())
1936 localRoot = toWebLocalFrameImpl(localRoot->parent()); 1945 localRoot = toWebLocalFrameImpl(localRoot->parent());
1937 return localRoot; 1946 return localRoot;
1938 } 1947 }
1939 1948
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2420 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2412 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2421 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2413 } else { 2422 } else {
2414 clipHtml = 2423 clipHtml =
2415 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2424 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2416 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2425 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2417 } 2426 }
2418 } 2427 }
2419 2428
2420 } // namespace blink 2429 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/agent/agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698