OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ | 5 #ifndef EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ |
6 #define EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ | 6 #define EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
9 #include "url/gurl.h" | 10 #include "url/gurl.h" |
10 | 11 |
11 namespace base { | 12 namespace base { |
12 class Value; | 13 class Value; |
13 } | 14 } |
14 | 15 |
15 namespace extensions { | 16 namespace extensions { |
16 | 17 |
17 // Extra information about an event that is used in event filtering. | 18 // Extra information about an event that is used in event filtering. |
18 // | 19 // |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 53 |
53 bool has_url() const { return has_url_; } | 54 bool has_url() const { return has_url_; } |
54 const GURL& url() const { return url_; } | 55 const GURL& url() const { return url_; } |
55 | 56 |
56 bool has_instance_id() const { return has_instance_id_; } | 57 bool has_instance_id() const { return has_instance_id_; } |
57 int instance_id() const { return instance_id_; } | 58 int instance_id() const { return instance_id_; } |
58 | 59 |
59 bool has_service_type() const { return !service_type_.empty(); } | 60 bool has_service_type() const { return !service_type_.empty(); } |
60 const std::string& service_type() const { return service_type_; } | 61 const std::string& service_type() const { return service_type_; } |
61 | 62 |
62 scoped_ptr<base::Value> AsValue() const; | 63 std::unique_ptr<base::Value> AsValue() const; |
63 bool IsEmpty() const; | 64 bool IsEmpty() const; |
64 | 65 |
65 private: | 66 private: |
66 bool has_url_; | 67 bool has_url_; |
67 GURL url_; | 68 GURL url_; |
68 std::string service_type_; | 69 std::string service_type_; |
69 | 70 |
70 bool has_instance_id_; | 71 bool has_instance_id_; |
71 int instance_id_; | 72 int instance_id_; |
72 | 73 |
73 bool has_window_type_; | 74 bool has_window_type_; |
74 std::string window_type_; | 75 std::string window_type_; |
75 | 76 |
76 bool has_window_exposed_by_default_; | 77 bool has_window_exposed_by_default_; |
77 bool window_exposed_by_default_; | 78 bool window_exposed_by_default_; |
78 | 79 |
79 // Allow implicit copy and assignment. | 80 // Allow implicit copy and assignment. |
80 }; | 81 }; |
81 | 82 |
82 } // namespace extensions | 83 } // namespace extensions |
83 | 84 |
84 #endif // EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ | 85 #endif // EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ |
OLD | NEW |