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: webkit/glue/plugins/pepper_buffer.cc

Issue 5648004: Add the "virtual" keyword on method overrides that are missing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing file Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/pepper_buffer.h ('k') | webkit/glue/plugins/pepper_directory_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_buffer.h" 5 #include "webkit/glue/plugins/pepper_buffer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 Buffer::~Buffer() { 76 Buffer::~Buffer() {
77 } 77 }
78 78
79 // static 79 // static
80 const PPB_Buffer_Dev* Buffer::GetInterface() { 80 const PPB_Buffer_Dev* Buffer::GetInterface() {
81 return &ppb_buffer; 81 return &ppb_buffer;
82 } 82 }
83 83
84 Buffer* Buffer::AsBuffer() { return this; }
85
84 bool Buffer::Init(uint32_t size) { 86 bool Buffer::Init(uint32_t size) {
85 if (size == 0) 87 if (size == 0)
86 return false; 88 return false;
87 Unmap(); 89 Unmap();
88 size_ = size; 90 size_ = size;
89 return true; 91 return true;
90 } 92 }
91 93
92 void Buffer::Describe(uint32_t* size_in_bytes) const { 94 void Buffer::Describe(uint32_t* size_in_bytes) const {
93 *size_in_bytes = size_; 95 *size_in_bytes = size_;
(...skipping 14 matching lines...) Expand all
108 mem_buffer_.reset(); 110 mem_buffer_.reset();
109 } 111 }
110 112
111 void Buffer::Swap(Buffer* other) { 113 void Buffer::Swap(Buffer* other) {
112 swap(other->mem_buffer_, mem_buffer_); 114 swap(other->mem_buffer_, mem_buffer_);
113 std::swap(other->size_, size_); 115 std::swap(other->size_, size_);
114 } 116 }
115 117
116 } // namespace pepper 118 } // namespace pepper
117 119
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_buffer.h ('k') | webkit/glue/plugins/pepper_directory_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698