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

Side by Side Diff: third_party/WebKit/Source/modules/nfc/MessageCallback.h

Issue 1759373003: [webnfc] Implement nfc.watch in blink nfc module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@implement_nfc_push_in_android
Patch Set: Fixes for comments from haraken Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MessageCallback_h 5 #ifndef MessageCallback_h
6 #define MessageCallback_h 6 #define MessageCallback_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class NFCMessage; 12 class NFCMessage;
13 class ScriptState;
13 14
14 class MessageCallback : public GarbageCollectedFinalized<MessageCallback> { 15 class MessageCallback : public GarbageCollectedFinalized<MessageCallback> {
15 public: 16 public:
16 virtual ~MessageCallback() {} 17 virtual ~MessageCallback() {}
17 DEFINE_INLINE_VIRTUAL_TRACE() {} 18 DEFINE_INLINE_VIRTUAL_TRACE() {}
18 virtual void handleMessage(const NFCMessage&) = 0; 19 virtual void handleMessage(const NFCMessage&) = 0;
20
21 void setScriptState(ScriptState* scriptState) { m_scriptState = scriptState; }
22 ScriptState* getScriptState() const { return m_scriptState.get(); }
23
24 private:
25 RefPtr<ScriptState> m_scriptState;
19 }; 26 };
20 27
21 } // namespace blink 28 } // namespace blink
22 29
23 #endif // MessageCallback_h 30 #endif // MessageCallback_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/nfc/watch.html ('k') | third_party/WebKit/Source/modules/nfc/NFC.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698