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

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

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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) 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 <QuartzCore/QuartzCore.h> 5 #include <QuartzCore/QuartzCore.h>
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
8 8
9 #include "app/app_switches.h" 9 #include "app/app_switches.h"
10 #include "app/surface/io_surface_support_mac.h" 10 #include "app/surface/io_surface_support_mac.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 rect.set_height(size.height()); 617 rect.set_height(size.height());
618 [cocoa_view_ setFrame: 618 [cocoa_view_ setFrame:
619 [(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]]; 619 [(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]];
620 } 620 }
621 621
622 gfx::NativeView RenderWidgetHostViewMac::GetNativeView() { 622 gfx::NativeView RenderWidgetHostViewMac::GetNativeView() {
623 return native_view(); 623 return native_view();
624 } 624 }
625 625
626 void RenderWidgetHostViewMac::MovePluginWindows( 626 void RenderWidgetHostViewMac::MovePluginWindows(
627 const std::vector<webkit_glue::WebPluginGeometry>& moves) { 627 const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
628 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 628 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
629 // Handle movement of accelerated plugins, which are the only "windowed" 629 // Handle movement of accelerated plugins, which are the only "windowed"
630 // plugins that exist on the Mac. 630 // plugins that exist on the Mac.
631 for (std::vector<webkit_glue::WebPluginGeometry>::const_iterator iter = 631 for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter =
632 moves.begin(); 632 moves.begin();
633 iter != moves.end(); 633 iter != moves.end();
634 ++iter) { 634 ++iter) {
635 webkit_glue::WebPluginGeometry geom = *iter; 635 webkit::npapi::WebPluginGeometry geom = *iter;
636 636
637 AcceleratedPluginView* view = ViewForPluginWindowHandle(geom.window); 637 AcceleratedPluginView* view = ViewForPluginWindowHandle(geom.window);
638 DCHECK(view); 638 DCHECK(view);
639 if (!view) 639 if (!view)
640 continue; 640 continue;
641 641
642 if (geom.rects_valid) { 642 if (geom.rects_valid) {
643 gfx::Rect rect = geom.window_rect; 643 gfx::Rect rect = geom.window_rect;
644 if (geom.visible) { 644 if (geom.visible) {
645 rect.set_x(rect.x() + geom.clip_rect.x()); 645 rect.set_x(rect.x() + geom.clip_rect.x());
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 // Fake up a WebPluginGeometry for the root window to set the 979 // Fake up a WebPluginGeometry for the root window to set the
980 // container's size; we will never get a notification from the 980 // container's size; we will never get a notification from the
981 // browser about the root window, only plugins. 981 // browser about the root window, only plugins.
982 webkit_glue::WebPluginGeometry geom; 982 webkit_glue::WebPluginGeometry geom;
983 gfx::Rect rect(0, 0, width, height); 983 gfx::Rect rect(0, 0, width, height);
984 geom.window = window; 984 geom.window = window;
985 geom.window_rect = rect; 985 geom.window_rect = rect;
986 geom.clip_rect = rect; 986 geom.clip_rect = rect;
987 geom.visible = true; 987 geom.visible = true;
988 geom.rects_valid = true; 988 geom.rects_valid = true;
989 MovePluginWindows(std::vector<webkit_glue::WebPluginGeometry>(1, geom)); 989 MovePluginWindows(std::vector<webkit::npapi::WebPluginGeometry>(1, geom));
990 } 990 }
991 } 991 }
992 992
993 void RenderWidgetHostViewMac::AcceleratedSurfaceSetTransportDIB( 993 void RenderWidgetHostViewMac::AcceleratedSurfaceSetTransportDIB(
994 gfx::PluginWindowHandle window, 994 gfx::PluginWindowHandle window,
995 int32 width, 995 int32 width,
996 int32 height, 996 int32 height,
997 TransportDIB::Handle transport_dib) { 997 TransportDIB::Handle transport_dib) {
998 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 998 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
999 plugin_container_manager_.SetSizeAndTransportDIB(window, 999 plugin_container_manager_.SetSizeAndTransportDIB(window,
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 if (!string) return NO; 2680 if (!string) return NO;
2681 2681
2682 // If the user is currently using an IME, confirm the IME input, 2682 // If the user is currently using an IME, confirm the IME input,
2683 // and then insert the text from the service, the same as TextEdit and Safari. 2683 // and then insert the text from the service, the same as TextEdit and Safari.
2684 [self confirmComposition]; 2684 [self confirmComposition];
2685 [self insertText:string]; 2685 [self insertText:string];
2686 return YES; 2686 return YES;
2687 } 2687 }
2688 2688
2689 @end 2689 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698