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

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

Issue 11421066: Refactor PPB_Flash_Fullscreen to the new resource model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 } 1933 }
1934 1934
1935 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) { 1935 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) {
1936 return PP_FromBool(full_frame()); 1936 return PP_FromBool(full_frame());
1937 } 1937 }
1938 1938
1939 const ViewData* PluginInstance::GetViewData(PP_Instance instance) { 1939 const ViewData* PluginInstance::GetViewData(PP_Instance instance) {
1940 return &view_data_; 1940 return &view_data_;
1941 } 1941 }
1942 1942
1943 PP_Bool PluginInstance::FlashIsFullscreen(PP_Instance instance) {
1944 return PP_FromBool(flash_fullscreen_);
1945 }
1946
1943 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) { 1947 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) {
1944 if (!container_) 1948 if (!container_)
1945 return PP_MakeUndefined(); 1949 return PP_MakeUndefined();
1946 1950
1947 WebFrame* frame = container_->element().document().frame(); 1951 WebFrame* frame = container_->element().document().frame();
1948 if (!frame) 1952 if (!frame)
1949 return PP_MakeUndefined(); 1953 return PP_MakeUndefined();
1950 1954
1951 return NPObjectToPPVar(this, frame->windowObject()); 1955 return NPObjectToPPVar(this, frame->windowObject());
1952 } 1956 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2136
2133 ::ppapi::thunk::PPB_Flash_API* PluginInstance::GetFlashAPI() { 2137 ::ppapi::thunk::PPB_Flash_API* PluginInstance::GetFlashAPI() {
2134 return &flash_impl_; 2138 return &flash_impl_;
2135 } 2139 }
2136 2140
2137 ::ppapi::Resource* PluginInstance::GetSingletonResource( 2141 ::ppapi::Resource* PluginInstance::GetSingletonResource(
2138 PP_Instance instance, 2142 PP_Instance instance,
2139 ::ppapi::SingletonResourceID id) { 2143 ::ppapi::SingletonResourceID id) {
2140 // Flash APIs aren't implemented in-process. 2144 // Flash APIs aren't implemented in-process.
2141 switch (id) { 2145 switch (id) {
2146 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
2147 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
2142 case ::ppapi::FLASH_SINGLETON_ID: 2148 case ::ppapi::FLASH_SINGLETON_ID:
2143 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
2144 NOTIMPLEMENTED(); 2149 NOTIMPLEMENTED();
2145 return NULL; 2150 return NULL;
2146 case ::ppapi::GAMEPAD_SINGLETON_ID: 2151 case ::ppapi::GAMEPAD_SINGLETON_ID:
2147 return gamepad_impl_; 2152 return gamepad_impl_;
2148 } 2153 }
2149 2154
2150 NOTREACHED(); 2155 NOTREACHED();
2151 return NULL; 2156 return NULL;
2152 } 2157 }
2153 2158
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 screen_size_for_fullscreen_ = gfx::Size(); 2489 screen_size_for_fullscreen_ = gfx::Size();
2485 WebElement element = container_->element(); 2490 WebElement element = container_->element();
2486 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2491 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2487 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2492 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2488 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2493 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2489 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2494 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2490 } 2495 }
2491 2496
2492 } // namespace ppapi 2497 } // namespace ppapi
2493 } // namespace webkit 2498 } // 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