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

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

Issue 9348029: Make inline c blocks non-greedy, and use to add pragma pack to gamepad structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: temporarily disable static assert for 2 sided roll Created 8 years, 10 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
« no previous file with comments | « ppapi/generators/idl_lexer.py ('k') | no next file » | 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 COMPILE_ASSERT_MATCHING_ENUM(TypeNotAllowed, PP_CURSORTYPE_NOTALLOWED); 214 COMPILE_ASSERT_MATCHING_ENUM(TypeNotAllowed, PP_CURSORTYPE_NOTALLOWED);
215 COMPILE_ASSERT_MATCHING_ENUM(TypeZoomIn, PP_CURSORTYPE_ZOOMIN); 215 COMPILE_ASSERT_MATCHING_ENUM(TypeZoomIn, PP_CURSORTYPE_ZOOMIN);
216 COMPILE_ASSERT_MATCHING_ENUM(TypeZoomOut, PP_CURSORTYPE_ZOOMOUT); 216 COMPILE_ASSERT_MATCHING_ENUM(TypeZoomOut, PP_CURSORTYPE_ZOOMOUT);
217 COMPILE_ASSERT_MATCHING_ENUM(TypeGrab, PP_CURSORTYPE_GRAB); 217 COMPILE_ASSERT_MATCHING_ENUM(TypeGrab, PP_CURSORTYPE_GRAB);
218 COMPILE_ASSERT_MATCHING_ENUM(TypeGrabbing, PP_CURSORTYPE_GRABBING); 218 COMPILE_ASSERT_MATCHING_ENUM(TypeGrabbing, PP_CURSORTYPE_GRABBING);
219 // Do not assert WebCursorInfo::TypeCustom == PP_CURSORTYPE_CUSTOM; 219 // Do not assert WebCursorInfo::TypeCustom == PP_CURSORTYPE_CUSTOM;
220 // PP_CURSORTYPE_CUSTOM is pinned to allow new cursor types. 220 // PP_CURSORTYPE_CUSTOM is pinned to allow new cursor types.
221 221
222 // Ensure conversion from WebKit::WebGamepads to PP_GamepadsData_Dev is safe. 222 // Ensure conversion from WebKit::WebGamepads to PP_GamepadsData_Dev is safe.
223 // See also DCHECKs in SampleGamepads below. 223 // See also DCHECKs in SampleGamepads below.
224 COMPILE_ASSERT(sizeof(WebKit::WebGamepads) == sizeof(PP_GamepadsData_Dev), 224 //
225 size_difference); 225 // Temporarily disabled for 2-sided WebKit roll.
226 COMPILE_ASSERT(sizeof(WebKit::WebGamepad) == sizeof(PP_GamepadData_Dev), 226 //COMPILE_ASSERT(sizeof(WebKit::WebGamepads) == sizeof(PP_GamepadsData_Dev),
227 size_difference); 227 // size_difference);
228 //COMPILE_ASSERT(sizeof(WebKit::WebGamepad) == sizeof(PP_GamepadData_Dev),
229 // size_difference);
228 230
229 // Sets |*security_origin| to be the WebKit security origin associated with the 231 // Sets |*security_origin| to be the WebKit security origin associated with the
230 // document containing the given plugin instance. On success, returns true. If 232 // document containing the given plugin instance. On success, returns true. If
231 // the instance is invalid, returns false and |*security_origin| will be 233 // the instance is invalid, returns false and |*security_origin| will be
232 // unchanged. 234 // unchanged.
233 bool SecurityOriginForInstance(PP_Instance instance_id, 235 bool SecurityOriginForInstance(PP_Instance instance_id,
234 WebKit::WebSecurityOrigin* security_origin) { 236 WebKit::WebSecurityOrigin* security_origin) {
235 PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); 237 PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id);
236 if (!instance) 238 if (!instance)
237 return false; 239 return false;
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 screen_size_for_fullscreen_ = gfx::Size(); 2088 screen_size_for_fullscreen_ = gfx::Size();
2087 WebElement element = container_->element(); 2089 WebElement element = container_->element();
2088 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2090 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2089 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2091 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2090 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2092 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2091 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2093 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2092 } 2094 }
2093 2095
2094 } // namespace ppapi 2096 } // namespace ppapi
2095 } // namespace webkit 2097 } // namespace webkit
OLDNEW
« no previous file with comments | « ppapi/generators/idl_lexer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698