OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
3 * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved. |
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. 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 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "platform/Widget.h" | 38 #include "platform/Widget.h" |
39 #include "public/platform/WebApplicationCacheHost.h" | 39 #include "public/platform/WebApplicationCacheHost.h" |
40 #include "public/platform/WebMediaPlayer.h" | 40 #include "public/platform/WebMediaPlayer.h" |
41 #include "public/platform/WebServiceWorkerProvider.h" | 41 #include "public/platform/WebServiceWorkerProvider.h" |
42 #include "public/platform/WebServiceWorkerProviderClient.h" | 42 #include "public/platform/WebServiceWorkerProviderClient.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 void fillWithEmptyClients(Page::PageClients& pageClients) | 46 void fillWithEmptyClients(Page::PageClients& pageClients) |
47 { | 47 { |
48 static ChromeClient* dummyChromeClient = adoptPtr(new EmptyChromeClient).lea
kPtr(); | 48 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ChromeClient>, dummyChromeClient,
(EmptyChromeClient::create())); |
49 pageClients.chromeClient = dummyChromeClient; | 49 pageClients.chromeClient = dummyChromeClient.get(); |
50 | 50 |
51 static ContextMenuClient* dummyContextMenuClient = adoptPtr(new EmptyContext
MenuClient).leakPtr(); | 51 DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ()); |
52 pageClients.contextMenuClient = dummyContextMenuClient; | 52 pageClients.contextMenuClient = &dummyContextMenuClient; |
53 | 53 |
54 static DragClient* dummyDragClient = adoptPtr(new EmptyDragClient).leakPtr()
; | 54 DEFINE_STATIC_LOCAL(EmptyDragClient, dummyDragClient, ()); |
55 pageClients.dragClient = dummyDragClient; | 55 pageClients.dragClient = &dummyDragClient; |
56 | 56 |
57 static EditorClient* dummyEditorClient = adoptPtr(new EmptyEditorClient).lea
kPtr(); | 57 DEFINE_STATIC_LOCAL(EmptyEditorClient, dummyEditorClient, ()); |
58 pageClients.editorClient = dummyEditorClient; | 58 pageClients.editorClient = &dummyEditorClient; |
59 | 59 |
60 static SpellCheckerClient* dummySpellCheckerClient = adoptPtr(new EmptySpell
CheckerClient).leakPtr(); | 60 DEFINE_STATIC_LOCAL(EmptySpellCheckerClient, dummySpellCheckerClient, ()); |
61 pageClients.spellCheckerClient = dummySpellCheckerClient; | 61 pageClients.spellCheckerClient = &dummySpellCheckerClient; |
62 } | 62 } |
63 | 63 |
64 class EmptyPopupMenu : public PopupMenu { | 64 class EmptyPopupMenu : public PopupMenu { |
65 public: | 65 public: |
66 void show(const FloatQuad&, const IntSize&, int) override { } | 66 void show(const FloatQuad&, const IntSize&, int) override { } |
67 void hide() override { } | 67 void hide() override { } |
68 void updateFromElement() override { } | 68 void updateFromElement() override { } |
69 void disconnectClient() override { } | 69 void disconnectClient() override { } |
70 }; | 70 }; |
71 | 71 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 { | 157 { |
158 return nullptr; | 158 return nullptr; |
159 } | 159 } |
160 | 160 |
161 PassOwnPtr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicationCac
heHost(WebApplicationCacheHostClient*) | 161 PassOwnPtr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicationCac
heHost(WebApplicationCacheHostClient*) |
162 { | 162 { |
163 return nullptr; | 163 return nullptr; |
164 } | 164 } |
165 | 165 |
166 } // namespace blink | 166 } // namespace blink |
OLD | NEW |