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

Side by Side Diff: content/renderer/npapi/webplugin_delegate_proxy.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 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/npapi/webplugin_delegate_proxy.h" 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
6 6
7 #if defined(USE_X11)
8 #include <cairo/cairo.h>
9 #endif
10
11 #include <algorithm> 7 #include <algorithm>
12 8
13 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
14 #include "base/basictypes.h" 10 #include "base/basictypes.h"
15 #include "base/command_line.h" 11 #include "base/command_line.h"
16 #include "base/file_util.h" 12 #include "base/file_util.h"
17 #include "base/logging.h" 13 #include "base/logging.h"
18 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
20 #include "base/process/process.h" 16 #include "base/process/process.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 641
646 bool WebPluginDelegateProxy::CreateSharedBitmap( 642 bool WebPluginDelegateProxy::CreateSharedBitmap(
647 scoped_ptr<TransportDIB>* memory, 643 scoped_ptr<TransportDIB>* memory,
648 scoped_ptr<skia::PlatformCanvas>* canvas) { 644 scoped_ptr<skia::PlatformCanvas>* canvas) {
649 const size_t size = BitmapSizeForPluginRect(plugin_rect_); 645 const size_t size = BitmapSizeForPluginRect(plugin_rect_);
650 #if defined(OS_POSIX) && !defined(OS_MACOSX) 646 #if defined(OS_POSIX) && !defined(OS_MACOSX)
651 memory->reset(TransportDIB::Create(size, 0)); 647 memory->reset(TransportDIB::Create(size, 0));
652 if (!memory->get()) 648 if (!memory->get())
653 return false; 649 return false;
654 #endif 650 #endif
655 #if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) 651 #if defined(OS_POSIX) && !defined(OS_ANDROID)
656 TransportDIB::Handle handle; 652 TransportDIB::Handle handle;
657 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, false, &handle); 653 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, false, &handle);
658 if (!RenderThreadImpl::current()->Send(msg)) 654 if (!RenderThreadImpl::current()->Send(msg))
659 return false; 655 return false;
660 if (handle.fd < 0) 656 if (handle.fd < 0)
661 return false; 657 return false;
662 memory->reset(TransportDIB::Map(handle)); 658 memory->reset(TransportDIB::Map(handle));
663 #else 659 #else
664 static uint32 sequence_number = 0; 660 static uint32 sequence_number = 0;
665 memory->reset(TransportDIB::Create(size, sequence_number++)); 661 memory->reset(TransportDIB::Create(size, sequence_number++));
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 1234
1239 plugin_->URLRedirectResponse(allow, resource_id); 1235 plugin_->URLRedirectResponse(allow, resource_id);
1240 } 1236 }
1241 1237
1242 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, 1238 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url,
1243 bool* result) { 1239 bool* result) {
1244 *result = plugin_->CheckIfRunInsecureContent(url); 1240 *result = plugin_->CheckIfRunInsecureContent(url);
1245 } 1241 }
1246 1242
1247 } // namespace content 1243 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/renderer/npapi/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698