Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include "core/loader/EmptyClients.h" | 28 #include "core/loader/EmptyClients.h" |
| 29 | 29 |
| 30 #include <memory> | 30 #include <memory> |
| 31 #include "core/frame/ContentSettingsClient.h" | 31 #include "core/frame/ContentSettingsClient.h" |
| 32 #include "core/frame/LocalFrame.h" | 32 #include "core/frame/LocalFrame.h" |
| 33 #include "core/frame/VisualViewport.h" | 33 #include "core/frame/VisualViewport.h" |
| 34 #include "core/html/HTMLFormElement.h" | 34 #include "core/html/HTMLFormElement.h" |
| 35 #include "core/html/forms/ColorChooser.h" | 35 #include "core/html/forms/ColorChooser.h" |
| 36 #include "core/html/forms/DateTimeChooser.h" | 36 #include "core/html/forms/DateTimeChooser.h" |
| 37 #include "core/loader/DocumentLoader.h" | 37 #include "core/loader/DocumentLoader.h" |
| 38 #include "core/page/PagePopup.h" | |
| 38 #include "platform/FileChooser.h" | 39 #include "platform/FileChooser.h" |
| 39 #include "platform/wtf/PtrUtil.h" | 40 #include "platform/wtf/PtrUtil.h" |
| 40 #include "public/platform/Platform.h" | 41 #include "public/platform/Platform.h" |
| 41 #include "public/platform/WebApplicationCacheHost.h" | 42 #include "public/platform/WebApplicationCacheHost.h" |
| 42 #include "public/platform/WebMediaPlayer.h" | 43 #include "public/platform/WebMediaPlayer.h" |
| 43 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 44 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
| 44 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h " | 45 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h " |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 61 } | 62 } |
| 62 | 63 |
| 63 class EmptyPopupMenu : public PopupMenu { | 64 class EmptyPopupMenu : public PopupMenu { |
| 64 public: | 65 public: |
| 65 void Show() override {} | 66 void Show() override {} |
| 66 void Hide() override {} | 67 void Hide() override {} |
| 67 void UpdateFromElement(UpdateReason) override {} | 68 void UpdateFromElement(UpdateReason) override {} |
| 68 void DisconnectClient() override {} | 69 void DisconnectClient() override {} |
| 69 }; | 70 }; |
| 70 | 71 |
| 72 class EmptyPagePopup : public PagePopup { | |
| 73 public: | |
| 74 AXObject* RootAXObject() override { return nullptr; } | |
| 75 void SetWindowRect(const IntRect&) override {} | |
| 76 void PostMessage(const String&) override {} | |
| 77 }; | |
| 78 | |
| 71 class EmptyFrameScheduler : public WebFrameScheduler { | 79 class EmptyFrameScheduler : public WebFrameScheduler { |
| 72 public: | 80 public: |
| 73 EmptyFrameScheduler() { DCHECK(IsMainThread()); } | 81 EmptyFrameScheduler() { DCHECK(IsMainThread()); } |
| 74 void SetFrameVisible(bool) override {} | 82 void SetFrameVisible(bool) override {} |
| 75 RefPtr<WebTaskRunner> LoadingTaskRunner() override; | 83 RefPtr<WebTaskRunner> LoadingTaskRunner() override; |
| 76 RefPtr<WebTaskRunner> TimerTaskRunner() override; | 84 RefPtr<WebTaskRunner> TimerTaskRunner() override; |
| 77 RefPtr<WebTaskRunner> UnthrottledTaskRunner() override; | 85 RefPtr<WebTaskRunner> UnthrottledTaskRunner() override; |
| 78 RefPtr<WebTaskRunner> SuspendableTaskRunner() override; | 86 RefPtr<WebTaskRunner> SuspendableTaskRunner() override; |
| 79 }; | 87 }; |
| 80 | 88 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 91 } | 99 } |
| 92 | 100 |
| 93 RefPtr<WebTaskRunner> EmptyFrameScheduler::SuspendableTaskRunner() { | 101 RefPtr<WebTaskRunner> EmptyFrameScheduler::SuspendableTaskRunner() { |
| 94 return Platform::Current()->MainThread()->GetWebTaskRunner(); | 102 return Platform::Current()->MainThread()->GetWebTaskRunner(); |
| 95 } | 103 } |
| 96 | 104 |
| 97 PopupMenu* EmptyChromeClient::OpenPopupMenu(LocalFrame&, HTMLSelectElement&) { | 105 PopupMenu* EmptyChromeClient::OpenPopupMenu(LocalFrame&, HTMLSelectElement&) { |
| 98 return new EmptyPopupMenu(); | 106 return new EmptyPopupMenu(); |
| 99 } | 107 } |
| 100 | 108 |
| 109 PagePopup* EmptyChromeClient::OpenPagePopup(PagePopupClient*) { | |
| 110 return new EmptyPagePopup(); | |
|
dcheng
2017/05/15 04:04:51
Can we just return nullptr here?
sashab
2017/05/15 05:23:32
Good idea; done.
| |
| 111 } | |
| 112 | |
| 101 ColorChooser* EmptyChromeClient::OpenColorChooser(LocalFrame*, | 113 ColorChooser* EmptyChromeClient::OpenColorChooser(LocalFrame*, |
| 102 ColorChooserClient*, | 114 ColorChooserClient*, |
| 103 const Color&) { | 115 const Color&) { |
| 104 return nullptr; | 116 return nullptr; |
| 105 } | 117 } |
| 106 | 118 |
| 107 DateTimeChooser* EmptyChromeClient::OpenDateTimeChooser( | 119 DateTimeChooser* EmptyChromeClient::OpenDateTimeChooser( |
| 108 DateTimeChooserClient*, | 120 DateTimeChooserClient*, |
| 109 const DateTimeChooserParameters&) { | 121 const DateTimeChooserParameters&) { |
| 110 return nullptr; | 122 return nullptr; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 | 218 |
| 207 std::unique_ptr<WebApplicationCacheHost> | 219 std::unique_ptr<WebApplicationCacheHost> |
| 208 EmptyLocalFrameClient::CreateApplicationCacheHost( | 220 EmptyLocalFrameClient::CreateApplicationCacheHost( |
| 209 WebApplicationCacheHostClient*) { | 221 WebApplicationCacheHostClient*) { |
| 210 return nullptr; | 222 return nullptr; |
| 211 } | 223 } |
| 212 | 224 |
| 213 EmptyRemoteFrameClient::EmptyRemoteFrameClient() = default; | 225 EmptyRemoteFrameClient::EmptyRemoteFrameClient() = default; |
| 214 | 226 |
| 215 } // namespace blink | 227 } // namespace blink |
| OLD | NEW |