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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 10905122: Initial NPAPI plugin support in Win Aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 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 | 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 gfx::NativeViewId RenderWidgetHostViewMac::GetNativeViewId() const { 472 gfx::NativeViewId RenderWidgetHostViewMac::GetNativeViewId() const {
473 return reinterpret_cast<gfx::NativeViewId>(GetNativeView()); 473 return reinterpret_cast<gfx::NativeViewId>(GetNativeView());
474 } 474 }
475 475
476 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() { 476 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() {
477 NOTIMPLEMENTED(); 477 NOTIMPLEMENTED();
478 return static_cast<gfx::NativeViewAccessible>(NULL); 478 return static_cast<gfx::NativeViewAccessible>(NULL);
479 } 479 }
480 480
481 void RenderWidgetHostViewMac::MovePluginWindows( 481 void RenderWidgetHostViewMac::MovePluginWindows(
482 const gfx::Point& scroll_offset,
482 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { 483 const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
483 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::MovePluginWindows"); 484 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::MovePluginWindows");
484 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 485 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
485 // Handle movement of accelerated plugins, which are the only "windowed" 486 // Handle movement of accelerated plugins, which are the only "windowed"
486 // plugins that exist on the Mac. 487 // plugins that exist on the Mac.
487 for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter = 488 for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter =
488 moves.begin(); 489 moves.begin();
489 iter != moves.end(); 490 iter != moves.end();
490 ++iter) { 491 ++iter) {
491 webkit::npapi::WebPluginGeometry geom = *iter; 492 webkit::npapi::WebPluginGeometry geom = *iter;
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1220 1221
1221 pending_swap_buffers_acks_.push_back(std::make_pair(params.route_id, 1222 pending_swap_buffers_acks_.push_back(std::make_pair(params.route_id,
1222 gpu_host_id)); 1223 gpu_host_id));
1223 1224
1224 // Compositor window is always gfx::kNullPluginWindow. 1225 // Compositor window is always gfx::kNullPluginWindow.
1225 // TODO(jbates) http://crbug.com/105344 This will be removed when there are no 1226 // TODO(jbates) http://crbug.com/105344 This will be removed when there are no
1226 // plugin windows. 1227 // plugin windows.
1227 if (params.window == gfx::kNullPluginWindow) { 1228 if (params.window == gfx::kNullPluginWindow) {
1228 NOTIMPLEMENTED(); 1229 NOTIMPLEMENTED();
1229 AckPendingSwapBuffers(); 1230 AckPendingSwapBuffers();
1230 } else { 1231 } else {
1231 // Deprecated accelerated plugin code path. 1232 // Deprecated accelerated plugin code path.
1232 AcceleratedPluginView* view = ViewForPluginWindowHandle(params.window); 1233 AcceleratedPluginView* view = ViewForPluginWindowHandle(params.window);
1233 DCHECK(view); 1234 DCHECK(view);
1234 if (view) { 1235 if (view) {
1235 plugin_container_manager_.SetSurfaceWasPaintedTo( 1236 plugin_container_manager_.SetSurfaceWasPaintedTo(
1236 params.window, 1237 params.window,
1237 params.surface_handle, 1238 params.surface_handle,
1238 gfx::Rect(params.x, params.y, params.width, params.height)); 1239 gfx::Rect(params.x, params.y, params.width, params.height));
1239 1240
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 if (!string) return NO; 3280 if (!string) return NO;
3280 3281
3281 // If the user is currently using an IME, confirm the IME input, 3282 // If the user is currently using an IME, confirm the IME input,
3282 // and then insert the text from the service, the same as TextEdit and Safari. 3283 // and then insert the text from the service, the same as TextEdit and Safari.
3283 [self confirmComposition]; 3284 [self confirmComposition];
3284 [self insertText:string]; 3285 [self insertText:string];
3285 return YES; 3286 return YES;
3286 } 3287 }
3287 3288
3288 @end 3289 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698