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

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

Issue 9271028: android build: progress on content and libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify conditional to make work on non-Android Created 8 years, 11 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 | Annotate | Revision Log
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 "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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #endif 135 #endif
136 136
137 virtual skia::PlatformCanvas* Map() { 137 virtual skia::PlatformCanvas* Map() {
138 return dib_->GetPlatformCanvas(width_, height_); 138 return dib_->GetPlatformCanvas(width_, height_);
139 } 139 }
140 140
141 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const { 141 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const {
142 *byte_count = dib_->size(); 142 *byte_count = dib_->size();
143 #if defined(OS_WIN) 143 #if defined(OS_WIN)
144 return reinterpret_cast<intptr_t>(dib_->handle()); 144 return reinterpret_cast<intptr_t>(dib_->handle());
145 #elif defined(OS_MACOSX) 145 #elif defined(OS_MACOSX) || defined(OS_ANDROID)
146 return static_cast<intptr_t>(dib_->handle().fd); 146 return static_cast<intptr_t>(dib_->handle().fd);
147 #elif defined(OS_POSIX) 147 #elif defined(OS_POSIX)
148 return static_cast<intptr_t>(dib_->handle()); 148 return static_cast<intptr_t>(dib_->handle());
149 #endif 149 #endif
150 } 150 }
151 151
152 virtual TransportDIB* GetTransportDIB() const { 152 virtual TransportDIB* GetTransportDIB() const {
153 return dib_.get(); 153 return dib_.get();
154 } 154 }
155 155
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 2165
2166 bool PepperPluginDelegateImpl::CanUseSocketAPIs() { 2166 bool PepperPluginDelegateImpl::CanUseSocketAPIs() {
2167 WebView* webview = render_view_->webview(); 2167 WebView* webview = render_view_->webview();
2168 WebFrame* main_frame = webview ? webview->mainFrame() : NULL; 2168 WebFrame* main_frame = webview ? webview->mainFrame() : NULL;
2169 GURL url(main_frame ? GURL(main_frame->document().url()) : GURL()); 2169 GURL url(main_frame ? GURL(main_frame->document().url()) : GURL());
2170 if (!url.is_valid()) 2170 if (!url.is_valid())
2171 return false; 2171 return false;
2172 2172
2173 return content::GetContentClient()->renderer()->AllowSocketAPI(url); 2173 return content::GetContentClient()->renderer()->AllowSocketAPI(url);
2174 } 2174 }
OLDNEW
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/renderer/render_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698