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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10392018: remove WEBKIT_USING_CG (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « webkit/media/webmediaplayer_impl.cc ('k') | webkit/plugins/sad_plugin.cc » ('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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 1851
1852 ImageDataAutoMapper auto_mapper(image_data); 1852 ImageDataAutoMapper auto_mapper(image_data);
1853 if (!auto_mapper.is_valid()) 1853 if (!auto_mapper.is_valid())
1854 return PP_FALSE; 1854 return PP_FALSE;
1855 1855
1856 scoped_ptr<WebCursorInfo> custom_cursor( 1856 scoped_ptr<WebCursorInfo> custom_cursor(
1857 new WebCursorInfo(WebCursorInfo::TypeCustom)); 1857 new WebCursorInfo(WebCursorInfo::TypeCustom));
1858 custom_cursor->hotSpot.x = hot_spot->x; 1858 custom_cursor->hotSpot.x = hot_spot->x;
1859 custom_cursor->hotSpot.y = hot_spot->y; 1859 custom_cursor->hotSpot.y = hot_spot->y;
1860 1860
1861 #if WEBKIT_USING_SKIA
1862 const SkBitmap* bitmap = image_data->GetMappedBitmap(); 1861 const SkBitmap* bitmap = image_data->GetMappedBitmap();
1863 // Make a deep copy, so that the cursor remains valid even after the original 1862 // Make a deep copy, so that the cursor remains valid even after the original
1864 // image data gets freed. 1863 // image data gets freed.
1865 if (!bitmap->copyTo(&custom_cursor->customImage.getSkBitmap(), 1864 if (!bitmap->copyTo(&custom_cursor->customImage.getSkBitmap(),
1866 bitmap->config())) { 1865 bitmap->config())) {
1867 return PP_FALSE; 1866 return PP_FALSE;
1868 } 1867 }
1869 #elif WEBKIT_USING_CG
1870 // TODO(yzshen): Implement it.
1871 NOTIMPLEMENTED();
1872 return false;
1873 #endif
1874 1868
1875 DoSetCursor(custom_cursor.release()); 1869 DoSetCursor(custom_cursor.release());
1876 return PP_TRUE; 1870 return PP_TRUE;
1877 } 1871 }
1878 1872
1879 int32_t PluginInstance::LockMouse(PP_Instance instance, 1873 int32_t PluginInstance::LockMouse(PP_Instance instance,
1880 PP_CompletionCallback callback) { 1874 PP_CompletionCallback callback) {
1881 if (!callback.func) { 1875 if (!callback.func) {
1882 // Don't support synchronous call. 1876 // Don't support synchronous call.
1883 return PP_ERROR_BLOCKS_MAIN_THREAD; 1877 return PP_ERROR_BLOCKS_MAIN_THREAD;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 screen_size_for_fullscreen_ = gfx::Size(); 2065 screen_size_for_fullscreen_ = gfx::Size();
2072 WebElement element = container_->element(); 2066 WebElement element = container_->element();
2073 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2067 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2074 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2068 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2075 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2069 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2076 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2070 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2077 } 2071 }
2078 2072
2079 } // namespace ppapi 2073 } // namespace ppapi
2080 } // namespace webkit 2074 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/media/webmediaplayer_impl.cc ('k') | webkit/plugins/sad_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698