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

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: Address comments from fady 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 printf("++++ %s\n", __PRETTY_FUNCTION__);
17 }
18
19 bool GuestviewAllocateInstanceIdFunction::RunAsync() {
20 printf("++++ %s\n", __PRETTY_FUNCTION__);
21 scoped_ptr<guestview::AllocateInstanceId::Params> params(
22 guestview::AllocateInstanceId::Params::Create(*args_));
23 EXTENSION_FUNCTION_VALIDATE(params.get());
24
25 int instanceId =
26 GuestViewManager::FromBrowserContext(
27 browser_context())->GetNextInstanceID();
28 SetResult(base::Value::CreateIntegerValue(instanceId));
29 SendResponse(true);
30 return true;
31 }
32
33 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698