Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_RENDERER_MESSAGING_BINDINGS_H_ | 5 #ifndef EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ |
| 6 #define EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ | 6 #define EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 // Active ports, mapped by local port id. | 110 // Active ports, mapped by local port id. |
| 111 PortMap ports_; | 111 PortMap ports_; |
| 112 | 112 |
| 113 // Ports which are disconnected, but haven't been fully initialized. Once | 113 // Ports which are disconnected, but haven't been fully initialized. Once |
| 114 // initialized and any pending messages are sent, these ports are removed. | 114 // initialized and any pending messages are sent, these ports are removed. |
| 115 PortMap disconnected_ports_; | 115 PortMap disconnected_ports_; |
| 116 | 116 |
| 117 // The next available local id for a port. | 117 // The next available local id for a port. |
| 118 int next_local_id_ = 0; | 118 int next_local_id_ = 0; |
| 119 | 119 |
| 120 // The number of ports created in the 'beforeunload' event handler. | |
| 121 int ports_created_in_before_unload_ = 0; | |
|
lazyboy
2016/11/11 01:39:17
since these are unsigned, can make them unsigned i
Devlin
2016/11/12 01:24:30
Done.
| |
| 122 | |
| 123 // The number of ports created in the 'unload' event handler. | |
| 124 int ports_created_in_unload_ = 0; | |
| 125 | |
| 126 // The number of ports created during the normal lifetime of the context. | |
|
lazyboy
2016/11/11 01:39:17
nit: replace "normal lifetime" with something that
Devlin
2016/11/12 01:24:30
Done.
| |
| 127 int ports_created_normal_ = 0; | |
| 128 | |
| 120 base::WeakPtrFactory<MessagingBindings> weak_ptr_factory_; | 129 base::WeakPtrFactory<MessagingBindings> weak_ptr_factory_; |
| 121 | 130 |
| 122 DISALLOW_COPY_AND_ASSIGN(MessagingBindings); | 131 DISALLOW_COPY_AND_ASSIGN(MessagingBindings); |
| 123 }; | 132 }; |
| 124 | 133 |
| 125 } // namespace extensions | 134 } // namespace extensions |
| 126 | 135 |
| 127 #endif // EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ | 136 #endif // EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ |
| OLD | NEW |