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

Unified Diff: public/web/WebServiceWorkerContextClient.h

Issue 779563003: [POC-WIP] Link window focus tokens with ExecutionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebServiceWorkerClientFocusCallback.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebServiceWorkerContextClient.h
diff --git a/public/web/WebServiceWorkerContextClient.h b/public/web/WebServiceWorkerContextClient.h
index 00823667d11aef478ed621749ebc5a142f87351d..abd86580a68839ae1cecba86a2eb82e32d115488 100644
--- a/public/web/WebServiceWorkerContextClient.h
+++ b/public/web/WebServiceWorkerContextClient.h
@@ -33,6 +33,7 @@
#include "WebWorkerPermissionClientProxy.h"
#include "public/platform/WebMessagePortChannel.h"
+#include "public/platform/WebServiceWorkerClientFocusCallback.h"
#include "public/platform/WebServiceWorkerClientsInfo.h"
#include "public/platform/WebServiceWorkerEventResult.h"
#include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h"
@@ -154,6 +155,17 @@ public:
// Ownership of the passed callbacks is transferred to the callee, callee
// should delete the callbacks after run.
virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
+
+ // Ownership of the passed callbacks is transferred to the callee, callee
+ // should delete the callback after calling either onSuccess or onError.
+ virtual void focus(int clientID, WebServiceWorkerClientFocusCallback* callback)
+ {
+ // FIXME: call BLINK_ASSERT_NOT_REACHED() when Chromium implementation
+ // is present. https://crbug.com/437149
+ bool result = true;
+ callback->onSuccess(&result);
+ delete callback;
+ }
};
} // namespace blink
« no previous file with comments | « public/platform/WebServiceWorkerClientFocusCallback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698