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

Side by Side Diff: webkit/glue/plugins/pepper_webplugin_impl.cc

Issue 3352019: Add fullscreen support to Pepper. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: git cl tree Created 10 years, 3 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 | « webkit/glue/plugins/pepper_plugin_module.cc ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/pepper_webplugin_impl.h" 5 #include "webkit/glue/plugins/pepper_webplugin_impl.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "third_party/ppapi/c/pp_var.h" 8 #include "third_party/ppapi/c/pp_var.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 NPObject* WebPluginImpl::scriptableObject() { 75 NPObject* WebPluginImpl::scriptableObject() {
76 scoped_refptr<ObjectVar> object( 76 scoped_refptr<ObjectVar> object(
77 ObjectVar::FromPPVar(instance_->GetInstanceObject())); 77 ObjectVar::FromPPVar(instance_->GetInstanceObject()));
78 if (object) 78 if (object)
79 return object->np_object(); 79 return object->np_object();
80 return NULL; 80 return NULL;
81 } 81 }
82 82
83 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { 83 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) {
84 instance_->Paint(canvas, plugin_rect_, rect); 84 if (!instance_->IsFullscreen())
85 instance_->Paint(canvas, plugin_rect_, rect);
85 } 86 }
86 87
87 void WebPluginImpl::updateGeometry( 88 void WebPluginImpl::updateGeometry(
88 const WebRect& window_rect, 89 const WebRect& window_rect,
89 const WebRect& clip_rect, 90 const WebRect& clip_rect,
90 const WebVector<WebRect>& cut_outs_rects, 91 const WebVector<WebRect>& cut_outs_rects,
91 bool is_visible) { 92 bool is_visible) {
92 plugin_rect_ = window_rect; 93 plugin_rect_ = window_rect;
93 instance_->ViewChanged(plugin_rect_, clip_rect); 94 if (!instance_->IsFullscreen())
95 instance_->ViewChanged(plugin_rect_, clip_rect);
94 } 96 }
95 97
96 void WebPluginImpl::updateFocus(bool focused) { 98 void WebPluginImpl::updateFocus(bool focused) {
97 } 99 }
98 100
99 void WebPluginImpl::updateVisibility(bool visible) { 101 void WebPluginImpl::updateVisibility(bool visible) {
100 } 102 }
101 103
102 bool WebPluginImpl::acceptsInputEvents() { 104 bool WebPluginImpl::acceptsInputEvents() {
103 return true; 105 return true;
104 } 106 }
105 107
106 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, 108 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event,
107 WebKit::WebCursorInfo& cursor_info) { 109 WebKit::WebCursorInfo& cursor_info) {
110 if (instance_->IsFullscreen())
111 return false;
108 return instance_->HandleInputEvent(event, &cursor_info); 112 return instance_->HandleInputEvent(event, &cursor_info);
109 } 113 }
110 114
111 void WebPluginImpl::didReceiveResponse( 115 void WebPluginImpl::didReceiveResponse(
112 const WebKit::WebURLResponse& response) { 116 const WebKit::WebURLResponse& response) {
113 DCHECK(!document_loader_); 117 DCHECK(!document_loader_);
114 118
115 document_loader_ = new URLLoader(instance_); 119 document_loader_ = new URLLoader(instance_);
116 document_loader_->didReceiveResponse(NULL, response); 120 document_loader_->didReceiveResponse(NULL, response);
117 121
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 bool WebPluginImpl::printPage(int page_number, 194 bool WebPluginImpl::printPage(int page_number,
191 WebKit::WebCanvas* canvas) { 195 WebKit::WebCanvas* canvas) {
192 return instance_->PrintPage(page_number, canvas); 196 return instance_->PrintPage(page_number, canvas);
193 } 197 }
194 198
195 void WebPluginImpl::printEnd() { 199 void WebPluginImpl::printEnd() {
196 return instance_->PrintEnd(); 200 return instance_->PrintEnd();
197 } 201 }
198 202
199 } // namespace pepper 203 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698