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

Side by Side Diff: extensions/common/consumer_instance_info.h

Issue 906493004: Refactoring: de-couple Extensions from "script injection System" [render side]:2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_1
Patch Set: Rebase. Created 5 years, 10 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 2015 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 EXTENSIONS_COMMON_CONSUMER_INSTANCE_INFO_H_
6 #define EXTENSIONS_COMMON_CONSUMER_INSTANCE_INFO_H_
7
8 #include <string>
9
10 // Info of API consumer instance that content scripts will be injected on.
11 struct ConsumerInstanceInfo {
12 enum InstanceType { TAB, WEBVIEW };
13
14 ConsumerInstanceInfo() {}
15 ConsumerInstanceInfo(InstanceType type, int id)
16 : type_(type),
17 id_(id) {
18 }
19
20 InstanceType type() const { return type_; }
21 int id() const { return id_; }
22
23 private:
24 // The type of the consumer instance.
25 InstanceType type_;
26
27 // The id of the consumer instance.
28 // If the instance is a regular tab, |id_| is 0.
29 // If the instance is a <webview>, |id_| > 0.
30 int id_;
31 };
32
33 #endif // EXTENSIONS_COMMON_CONSUMER_INSTANCE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698