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

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: Resolve review comments 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/KeyboardLocker.h"
11 #include "platform/Supplementable.h"
12 #include "platform/heap/Handle.h"
13 #include "platform/heap/Member.h"
14 #include "wtf/Forward.h"
15
16 namespace blink {
17
18 class ChromeClient;
19 class ScriptPromiseResolver;
20
21 class CORE_EXPORT NavigatorKeyboardLock final
22 : public GarbageCollectedFinalized<NavigatorKeyboardLock>,
23 public Supplement<Navigator>,
24 private KeyboardLockerClient {
25 USING_GARBAGE_COLLECTED_MIXIN(NavigatorKeyboardLock);
26
27 public:
28 static NavigatorKeyboardLock& From(Navigator&);
29
30 static ScriptPromise requestKeyLock(ScriptState*,
31 Navigator&,
32 const Vector<String>&);
33 ScriptPromise requestKeyLock(ScriptState*, const Vector<String>&);
34
35 static void cancelKeyLock(Navigator&);
36 void cancelKeyLock();
37
38 DECLARE_TRACE();
39
40 private:
41 explicit NavigatorKeyboardLock(Navigator&);
42 static const char* SupplementName();
43
44 // KeyboardLockerClient
45 void LockRequestFinished(bool, const String&) override;
46
47 bool RetrieveChromeClient(ChromeClient*&, String&) const;
whywhat 2017/04/11 14:52:33 I don't think you need ChromeClient plumbing at al
Hzj_jie 2017/04/12 02:51:06 Yes, I just found this solution: my solution seems
48
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