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

Side by Side Diff: webkit/api/src/WebWorkerImpl.cpp

Issue 342024: Adds default implementations to WebFrameClient (Closed)
Patch Set: Created 11 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) 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 27 matching lines...) Expand all
38 #include "MessageEvent.h" 38 #include "MessageEvent.h"
39 #include "MessagePort.h" 39 #include "MessagePort.h"
40 #include "MessagePortChannel.h" 40 #include "MessagePortChannel.h"
41 #include "ScriptExecutionContext.h" 41 #include "ScriptExecutionContext.h"
42 #include "SecurityOrigin.h" 42 #include "SecurityOrigin.h"
43 #include "SerializedScriptValue.h" 43 #include "SerializedScriptValue.h"
44 #include "SubstituteData.h" 44 #include "SubstituteData.h"
45 #include <wtf/MainThread.h> 45 #include <wtf/MainThread.h>
46 #include <wtf/Threading.h> 46 #include <wtf/Threading.h>
47 47
48 #include "EmptyWebFrameClientImpl.h"
49 #include "PlatformMessagePortChannel.h" 48 #include "PlatformMessagePortChannel.h"
50 #include "WebDataSourceImpl.h" 49 #include "WebDataSourceImpl.h"
51 #include "WebFrameClient.h" 50 #include "WebFrameClient.h"
52 #include "WebMessagePortChannel.h" 51 #include "WebMessagePortChannel.h"
53 #include "WebScreenInfo.h" 52 #include "WebScreenInfo.h"
54 #include "WebString.h" 53 #include "WebString.h"
55 #include "WebURL.h" 54 #include "WebURL.h"
56 #include "WebView.h" 55 #include "WebView.h"
57 #include "WebWorkerClient.h" 56 #include "WebWorkerClient.h"
58 // FIXME: Move following includes to webkit api. 57 // FIXME: Move following includes to webkit api.
59 #include "webkit/glue/webframe_impl.h" 58 #include "webkit/glue/webframe_impl.h"
60 #include "webkit/glue/webpreferences.h" 59 #include "webkit/glue/webpreferences.h"
61 60
62 using namespace WebCore; 61 using namespace WebCore;
63 62
64 namespace WebKit { 63 namespace WebKit {
65 64
66 #if ENABLE(WORKERS) 65 #if ENABLE(WORKERS)
67 66
68 // Dummy WebViewDelegate - we only need it in Worker process to load a 67 // Dummy WebViewDelegate - we only need it in Worker process to load a
69 // 'shadow page' which will initialize WebCore loader. 68 // 'shadow page' which will initialize WebCore loader.
70 class WorkerWebFrameClient : public WebKit::EmptyWebFrameClient { 69 class WorkerWebFrameClient : public WebKit::WebFrameClient {
71 public: 70 public:
72 // Tell the loader to load the data into the 'shadow page' synchronously, 71 // Tell the loader to load the data into the 'shadow page' synchronously,
73 // so we can grab the resulting Document right after load. 72 // so we can grab the resulting Document right after load.
74 virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds) 73 virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds)
75 { 74 {
76 static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false); 75 static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
77 } 76 }
78 77
79 // Lazy allocate and leak this instance. 78 // Lazy allocate and leak this instance.
80 static WorkerWebFrameClient* sharedInstance() 79 static WorkerWebFrameClient* sharedInstance()
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 #else 374 #else
376 375
377 WebWorker* WebWorker::create(WebWorkerClient* client) 376 WebWorker* WebWorker::create(WebWorkerClient* client)
378 { 377 {
379 return 0; 378 return 0;
380 } 379 }
381 380
382 #endif // ENABLE(WORKERS) 381 #endif // ENABLE(WORKERS)
383 382
384 } // namespace WebKit 383 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698