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

Side by Side Diff: chrome/test/data/extensions/api_test/service_worker/tabs_create/sw.js

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 7 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 2016 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 self.onmessage = function(e) {
6 if (e.data == 'createTab') {
7 try {
8 chrome.tabs.create({'url': 'http://www.google.com'}, function(tabs) {
9 e.ports[0].postMessage('chrome.tabs.create callback');
10 });
11 } catch (e) {
12 e.ports[0].postMessage('FAILURE');
13 }
14 } else {
15 e.ports[0].postMessage('FAILURE');
16 }
17 };
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/service_worker/tabs_create/page.js ('k') | content/child/blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698