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

Side by Side Diff: third_party/WebKit/Source/modules/keyboard_lock/NavigatorKeyboardLock.h

Issue 2805763004: [System-Keyboard-Lock] Forward navigator functions to RenderFrameHost (Closed)
Patch Set: Add external/wpt tests Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NavigatorKeyboardLock_h
6 #define NavigatorKeyboardLock_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "core/frame/Navigator.h"
10 #include "platform/Supplementable.h"
11 #include "platform/heap/Handle.h"
12 #include "platform/heap/Member.h"
13 #include "public/platform/modules/keyboard_lock/keyboard_lock.mojom-blink.h"
14 #include "wtf/Forward.h"
15
16 namespace blink {
17
18 class ChromeClient;
19 class ScriptPromiseResolver;
20
21 class CORE_EXPORT NavigatorKeyboardLock final
whywhat 2017/04/12 16:02:13 nit: A class level comment would be nice to have (
Hzj_jie 2017/04/13 00:38:54 Done.
22 : public GarbageCollectedFinalized<NavigatorKeyboardLock>,
23 public Supplement<Navigator> {
24 USING_GARBAGE_COLLECTED_MIXIN(NavigatorKeyboardLock);
25
26 public:
27 static NavigatorKeyboardLock& From(Navigator&);
28
29 static ScriptPromise requestKeyLock(ScriptState*,
whywhat 2017/04/12 16:02:13 do you need both the static and non-static version
Hzj_jie 2017/04/13 00:38:54 I followed some other examples, which public both
30 Navigator&,
31 const Vector<String>&);
32 ScriptPromise requestKeyLock(ScriptState*, const Vector<String>&);
33
34 static void cancelKeyLock(Navigator&);
35 void cancelKeyLock();
36
37 DECLARE_TRACE();
38
39 private:
40 explicit NavigatorKeyboardLock(Navigator&);
41 static const char* SupplementName();
42
43 void LockRequestFinished(bool, const String&);
44 void CancelRequestFinished();
45
46 // bool RetrieveChromeClient(ChromeClient*&, String&) const;
whywhat 2017/04/12 16:02:13 nit: remove with a blank line under it?
Hzj_jie 2017/04/13 00:38:54 Sorry, I have not noticed this commented line.
47
48 mojom::blink::KeyboardLockServicePtr service_;
49 Member<ScriptPromiseResolver> request_keylock_resolver_;
50 };
51
52 } // namespace blink
53
54 #endif // NavigatorKeyboardLock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698