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

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

Issue 9369003: Pepper: Add a function to PPB_Flash to check if a rect is topmost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add stubs for InvokePrinting() and UpdateActivity() 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_flash_impl.h » ('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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 // Only GETs and POSTs are supported. 1329 // Only GETs and POSTs are supported.
1330 if (web_request.httpMethod() != "GET" && 1330 if (web_request.httpMethod() != "GET" &&
1331 web_request.httpMethod() != "POST") 1331 web_request.httpMethod() != "POST")
1332 return PP_ERROR_BADARGUMENT; 1332 return PP_ERROR_BADARGUMENT;
1333 1333
1334 WebString target_str = WebString::fromUTF8(target); 1334 WebString target_str = WebString::fromUTF8(target);
1335 container_->loadFrameRequest(web_request, target_str, false, NULL); 1335 container_->loadFrameRequest(web_request, target_str, false, NULL);
1336 return PP_OK; 1336 return PP_OK;
1337 } 1337 }
1338 1338
1339 bool PluginInstance::IsRectTopmost(const gfx::Rect& rect) {
1340 if (flash_fullscreen_)
1341 return true;
1342
1343 #if 0
1344 WebView* web_view = container()->element().document().frame()->view();
1345 if (!web_view) {
1346 NOTREACHED();
1347 return false;
1348 }
1349 #else
1350 //FIXME
1351 return container_->isRectTopmost(rect);
1352 #endif
1353 }
1354
1339 void PluginInstance::SampleGamepads(PP_Instance instance, 1355 void PluginInstance::SampleGamepads(PP_Instance instance,
1340 PP_GamepadsData_Dev* data) { 1356 PP_GamepadsData_Dev* data) {
1341 1357
1342 // Because the WebKit objects have trivial ctors, using offsetof doesn't 1358 // Because the WebKit objects have trivial ctors, using offsetof doesn't
1343 // work. Instead use this version based on src/v8/src/globals.h. This 1359 // work. Instead use this version based on src/v8/src/globals.h. This
1344 // workaround doesn't work in constant expressions as required for 1360 // workaround doesn't work in constant expressions as required for
1345 // COMPILE_ASSERT, so DCHECK instead. 1361 // COMPILE_ASSERT, so DCHECK instead.
1346 1362
1347 #define OFFSET_OF(type, field) \ 1363 #define OFFSET_OF(type, field) \
1348 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) 1364 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4)
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 screen_size_for_fullscreen_ = gfx::Size(); 2108 screen_size_for_fullscreen_ = gfx::Size();
2093 WebElement element = container_->element(); 2109 WebElement element = container_->element();
2094 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2110 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2095 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2111 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2096 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2112 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2097 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2113 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2098 } 2114 }
2099 2115
2100 } // namespace ppapi 2116 } // namespace ppapi
2101 } // namespace webkit 2117 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_flash_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698