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

Side by Side Diff: chrome/browser/extensions/api/guestview/guestview_api.cc

Issue 299753011: Move allocate instance id to chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug logs Created 6 years, 6 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 2014 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 #include "chrome/browser/extensions/api/guestview/guestview_api.h"
6
7 #include "chrome/browser/guest_view/guest_view_manager.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/api/guestview.h"
10
11 namespace guestview = extensions::api::guestview;
12
13 namespace extensions {
14
15 GuestviewAllocateInstanceIdFunction::GuestviewAllocateInstanceIdFunction() {
16 }
17
18 bool GuestviewAllocateInstanceIdFunction::RunAsync() {
19 EXTENSION_FUNCTION_VALIDATE(!args_->GetSize());
Fady Samuel 2014/06/03 19:40:40 Verify that we have webview permission here.
lazyboy 2014/06/03 22:30:10 Added CHECK.
20
21 int instanceId =
22 GuestViewManager::FromBrowserContext(
23 browser_context())->GetNextInstanceID();
24 SetResult(base::Value::CreateIntegerValue(instanceId));
25 SendResponse(true);
26 return true;
27 }
28
29 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698