OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/pepper/pepper_browser_connection.h" | 5 #include "content/renderer/pepper/pepper_browser_connection.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // number with a 0 ID. Note that signed wraparound is undefined in C++ so we | 89 // number with a 0 ID. Note that signed wraparound is undefined in C++ so we |
90 // manually check. | 90 // manually check. |
91 int32_t ret = next_sequence_number_; | 91 int32_t ret = next_sequence_number_; |
92 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) | 92 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) |
93 next_sequence_number_ = 1; // Skip 0 which is invalid. | 93 next_sequence_number_ = 1; // Skip 0 which is invalid. |
94 else | 94 else |
95 next_sequence_number_++; | 95 next_sequence_number_++; |
96 return ret; | 96 return ret; |
97 } | 97 } |
98 | 98 |
| 99 void PepperBrowserConnection::OnDestruct() { |
| 100 delete this; |
| 101 } |
| 102 |
99 } // namespace content | 103 } // namespace content |
OLD | NEW |