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

Side by Side Diff: content/renderer/pepper/pepper_browser_connection.cc

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 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
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
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
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_browser_connection.h ('k') | content/renderer/pepper/pepper_media_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698