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

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
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 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 } 1923 }
1924 1924
1925 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) { 1925 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) {
1926 return PP_FromBool(full_frame()); 1926 return PP_FromBool(full_frame());
1927 } 1927 }
1928 1928
1929 const ViewData* PluginInstance::GetViewData(PP_Instance instance) { 1929 const ViewData* PluginInstance::GetViewData(PP_Instance instance) {
1930 return &view_data_; 1930 return &view_data_;
1931 } 1931 }
1932 1932
1933 PP_Bool PluginInstance::FlashIsFullscreen(PP_Instance instance) {
1934 return PP_FromBool(flash_fullscreen_);
1935 }
1936
1933 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) { 1937 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) {
1934 if (!container_) 1938 if (!container_)
1935 return PP_MakeUndefined(); 1939 return PP_MakeUndefined();
1936 1940
1937 WebFrame* frame = container_->element().document().frame(); 1941 WebFrame* frame = container_->element().document().frame();
1938 if (!frame) 1942 if (!frame)
1939 return PP_MakeUndefined(); 1943 return PP_MakeUndefined();
1940 1944
1941 return NPObjectToPPVar(this, frame->windowObject()); 1945 return NPObjectToPPVar(this, frame->windowObject());
1942 } 1946 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 return &flash_impl_; 2128 return &flash_impl_;
2125 } 2129 }
2126 2130
2127 ::ppapi::Resource* PluginInstance::GetSingletonResource( 2131 ::ppapi::Resource* PluginInstance::GetSingletonResource(
2128 PP_Instance instance, 2132 PP_Instance instance,
2129 ::ppapi::SingletonResourceID id) { 2133 ::ppapi::SingletonResourceID id) {
2130 // Flash APIs aren't implemented in-process. 2134 // Flash APIs aren't implemented in-process.
2131 switch (id) { 2135 switch (id) {
2132 case ::ppapi::FLASH_SINGLETON_ID: 2136 case ::ppapi::FLASH_SINGLETON_ID:
2133 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID: 2137 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
2138 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
2134 NOTIMPLEMENTED(); 2139 NOTIMPLEMENTED();
2135 return NULL; 2140 return NULL;
2136 case ::ppapi::GAMEPAD_SINGLETON_ID: 2141 case ::ppapi::GAMEPAD_SINGLETON_ID:
2137 return gamepad_impl_; 2142 return gamepad_impl_;
2138 } 2143 }
2139 2144
2140 NOTREACHED(); 2145 NOTREACHED();
2141 return NULL; 2146 return NULL;
2142 } 2147 }
2143 2148
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 screen_size_for_fullscreen_ = gfx::Size(); 2482 screen_size_for_fullscreen_ = gfx::Size();
2478 WebElement element = container_->element(); 2483 WebElement element = container_->element();
2479 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2484 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2480 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2485 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2481 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2486 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2482 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2487 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2483 } 2488 }
2484 2489
2485 } // namespace ppapi 2490 } // namespace ppapi
2486 } // namespace webkit 2491 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698