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

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 8341052: share all the needed linux code with OpenBSD in chrome and content (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_plugin_delegate_impl.h" 5 #include "content/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 virtual skia::PlatformCanvas* Map() { 138 virtual skia::PlatformCanvas* Map() {
139 return dib_->GetPlatformCanvas(width_, height_); 139 return dib_->GetPlatformCanvas(width_, height_);
140 } 140 }
141 141
142 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const { 142 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const {
143 *byte_count = dib_->size(); 143 *byte_count = dib_->size();
144 #if defined(OS_WIN) 144 #if defined(OS_WIN)
145 return reinterpret_cast<intptr_t>(dib_->handle()); 145 return reinterpret_cast<intptr_t>(dib_->handle());
146 #elif defined(OS_MACOSX) 146 #elif defined(OS_MACOSX)
147 return static_cast<intptr_t>(dib_->handle().fd); 147 return static_cast<intptr_t>(dib_->handle().fd);
148 #elif defined(OS_LINUX) 148 #elif defined(OS_POSIX)
149 return static_cast<intptr_t>(dib_->handle()); 149 return static_cast<intptr_t>(dib_->handle());
150 #endif 150 #endif
151 } 151 }
152 152
153 virtual TransportDIB* GetTransportDIB() const { 153 virtual TransportDIB* GetTransportDIB() const {
154 return dib_.get(); 154 return dib_.get();
155 } 155 }
156 156
157 private: 157 private:
158 int width_; 158 int width_;
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 if (!context) 1737 if (!context)
1738 return NULL; 1738 return NULL;
1739 if (!context->makeContextCurrent() || context->isContextLost()) 1739 if (!context->makeContextCurrent() || context->isContextLost())
1740 return NULL; 1740 return NULL;
1741 1741
1742 RendererGLContext* parent_context = context->context(); 1742 RendererGLContext* parent_context = context->context();
1743 if (!parent_context) 1743 if (!parent_context)
1744 return NULL; 1744 return NULL;
1745 return parent_context; 1745 return parent_context;
1746 } 1746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698