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

Side by Side Diff: ppapi/host/ppapi_host.cc

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 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
« no previous file with comments | « ppapi/host/ppapi_host.h ('k') | ppapi/host/resource_host.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) 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 #include "ppapi/host/ppapi_host.h" 5 #include "ppapi/host/ppapi_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/host/host_factory.h" 9 #include "ppapi/host/host_factory.h"
10 #include "ppapi/host/host_message_context.h" 10 #include "ppapi/host/host_message_context.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 void PpapiHost::OnHostMsgResourceDestroyed(PP_Resource resource) { 158 void PpapiHost::OnHostMsgResourceDestroyed(PP_Resource resource) {
159 ResourceMap::iterator found = resources_.find(resource); 159 ResourceMap::iterator found = resources_.find(resource);
160 if (found == resources_.end()) { 160 if (found == resources_.end()) {
161 NOTREACHED(); 161 NOTREACHED();
162 return; 162 return;
163 } 163 }
164 resources_.erase(found); 164 resources_.erase(found);
165 } 165 }
166 166
167 ResourceHost* PpapiHost::GetResourceHost(PP_Resource resource) { 167 ResourceHost* PpapiHost::GetResourceHost(PP_Resource resource) const {
168 ResourceMap::iterator found = resources_.find(resource); 168 ResourceMap::const_iterator found = resources_.find(resource);
169 return found == resources_.end() ? NULL : found->second.get(); 169 return found == resources_.end() ? NULL : found->second.get();
170 } 170 }
171 171
172 } // namespace host 172 } // namespace host
173 } // namespace ppapi 173 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/host/ppapi_host.h ('k') | ppapi/host/resource_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698