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

Side by Side Diff: Source/modules/credentialmanager/CredentialManagerClient.h

Issue 1315743003: [part 1] Make classes and structures in modules/ fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CredentialManagerClient_h 5 #ifndef CredentialManagerClient_h
6 #define CredentialManagerClient_h 6 #define CredentialManagerClient_h
7 7
8 #include "core/page/Page.h" 8 #include "core/page/Page.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "public/platform/WebCredentialManagerClient.h" 11 #include "public/platform/WebCredentialManagerClient.h"
12 #include "public/platform/WebVector.h" 12 #include "public/platform/WebVector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class ExecutionContext; 16 class ExecutionContext;
17 class Page; 17 class Page;
18 class WebCredential; 18 class WebCredential;
19 class WebURL; 19 class WebURL;
20 20
21 // CredentialManagerClient lives as a supplement to Page, and wraps the embedder -provided 21 // CredentialManagerClient lives as a supplement to Page, and wraps the embedder -provided
22 // WebCredentialManagerClient's methods to make them visible to the bindings cod e. 22 // WebCredentialManagerClient's methods to make them visible to the bindings cod e.
23 class MODULES_EXPORT CredentialManagerClient final : public NoBaseWillBeGarbageC ollectedFinalized<CredentialManagerClient>, public WillBeHeapSupplement<Page> { 23 class MODULES_EXPORT CredentialManagerClient final : public NoBaseWillBeGarbageC ollectedFinalized<CredentialManagerClient>, public WillBeHeapSupplement<Page> {
24 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CredentialManagerClient); 24 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CredentialManagerClient);
25 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(CredentialManagerClient);
25 public: 26 public:
26 explicit CredentialManagerClient(WebCredentialManagerClient*); 27 explicit CredentialManagerClient(WebCredentialManagerClient*);
27 virtual ~CredentialManagerClient(); 28 virtual ~CredentialManagerClient();
28 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
29 30
30 static const char* supplementName(); 31 static const char* supplementName();
31 static CredentialManagerClient* from(Page*); 32 static CredentialManagerClient* from(Page*);
32 static CredentialManagerClient* from(ExecutionContext*); 33 static CredentialManagerClient* from(ExecutionContext*);
33 34
34 // Ownership of the callback is transferred to the callee for each of 35 // Ownership of the callback is transferred to the callee for each of
35 // the following methods. 36 // the following methods.
36 virtual void dispatchFailedSignIn(const WebCredential&, WebCredentialManager Client::NotificationCallbacks*); 37 virtual void dispatchFailedSignIn(const WebCredential&, WebCredentialManager Client::NotificationCallbacks*);
37 virtual void dispatchStore(const WebCredential&, WebCredentialManagerClient: :NotificationCallbacks*); 38 virtual void dispatchStore(const WebCredential&, WebCredentialManagerClient: :NotificationCallbacks*);
38 virtual void dispatchRequireUserMediation(WebCredentialManagerClient::Notifi cationCallbacks*); 39 virtual void dispatchRequireUserMediation(WebCredentialManagerClient::Notifi cationCallbacks*);
39 virtual void dispatchGet(bool zeroClickOnly, const WebVector<WebURL>& federa tions, WebCredentialManagerClient::RequestCallbacks*); 40 virtual void dispatchGet(bool zeroClickOnly, const WebVector<WebURL>& federa tions, WebCredentialManagerClient::RequestCallbacks*);
40 41
41 private: 42 private:
42 WebCredentialManagerClient* m_client; 43 WebCredentialManagerClient* m_client;
43 }; 44 };
44 45
45 MODULES_EXPORT void provideCredentialManagerClientTo(Page&, CredentialManagerCli ent*); 46 MODULES_EXPORT void provideCredentialManagerClientTo(Page&, CredentialManagerCli ent*);
46 47
47 } // namespace blink 48 } // namespace blink
48 49
49 #endif // CredentialManagerClient_h 50 #endif // CredentialManagerClient_h
OLDNEW
« no previous file with comments | « Source/modules/compositorworker/CompositorWorkerMessagingProxy.h ('k') | Source/modules/crypto/DOMWindowCrypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698