diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:17:24 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:17:24 +0000 |
commit | 7fd25315869cf0520d9dd813d407c58ff5c5508a (patch) | |
tree | 48a4d15e35b58139771f539005be3a8094553577 | |
parent | 8e1fae6e07bf92e9b0e6f07228c5df21fcd76232 (diff) | |
download | chromium_src-7fd25315869cf0520d9dd813d407c58ff5c5508a.zip chromium_src-7fd25315869cf0520d9dd813d407c58ff5c5508a.tar.gz chromium_src-7fd25315869cf0520d9dd813d407c58ff5c5508a.tar.bz2 |
Implement drops on web view.
BUG=13155, 15657
TEST=Dragging from other applications to web view should load urls or drop text depending on where in the view the drop occurs. Same with drags from the desktop. Drags within text fields on a webpage should work.
Review URL: http://codereview.chromium.org/149626
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20737 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/web_drop_target.h | 72 | ||||
-rw-r--r-- | chrome/browser/cocoa/web_drop_target.mm | 209 | ||||
-rw-r--r-- | chrome/browser/cocoa/web_drop_target_unittest.mm | 106 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.h | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 73 | ||||
-rw-r--r-- | chrome/chrome.gyp | 3 |
6 files changed, 443 insertions, 25 deletions
diff --git a/chrome/browser/cocoa/web_drop_target.h b/chrome/browser/cocoa/web_drop_target.h new file mode 100644 index 0000000..8e91398 --- /dev/null +++ b/chrome/browser/cocoa/web_drop_target.h @@ -0,0 +1,72 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <Cocoa/Cocoa.h> + +class RenderViewHost; +class TabContents; +class WebDropData; + +// A typedef for a RenderViewHost used for comparison purposes only. +typedef RenderViewHost* RenderViewHostIdentifier; + +// A class that handles tracking and event processing for a drag and drop +// over the content area. Assumes something else initiates the drag, this is +// only for processing during a drag. + +@interface WebDropTarget : NSObject { + @private + // Our associated TabContents. Weak reference. + TabContents* tabContents_; + + // Updated asynchronously during a drag to tell us whether or not we should + // allow the drop. + BOOL isDropTarget_; + + // Keep track of the render view host we're dragging over. If it changes + // during a drag, we need to re-send the DragEnter message. + RenderViewHostIdentifier currentRVH_; +} + +// |contents| is the TabContents representing this tab, used to communicate +// drag&drop messages to WebCore and handle navigation on a successful drop +// (if necessary). +- (id)initWithTabContents:(TabContents*)contents; + +// Call to set whether or not we should allow the drop. Takes effect the +// next time |-draggingUpdated:| is called. +- (void)setIsDropTarget:(BOOL)isDropTarget; + +// Messages to send during the tracking of a drag, ususally upon receiving +// calls from the view system. Communicates the drag messages to WebCore. +- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info + view:(NSView*)view; +- (void)draggingExited:(id<NSDraggingInfo>)info; +- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)info + view:(NSView*)view; +- (BOOL)performDragOperation:(id<NSDraggingInfo>)info + view:(NSView*)view; + +@end + +// Public use only for unit tests. +@interface WebDropTarget(Testing) +// Populate the URL portion of |data|. There may be more than one, but we only +// handle dropping the first. |data| must not be NULL. Assumes the caller has +// already called |-containsURLData|. +- (void)populateURLAndTitle:(WebDropData*)data + fromPasteboard:(NSPasteboard*)pboard; +// Given |data|, which should not be nil, fill it in using the contents of the +// given pasteboard. +- (void)populateWebDropData:(WebDropData*)data + fromPasteboard:(NSPasteboard*)pboard; +// Given a point in window coordinates and a view in that window, return a +// flipped point in the coordinate system of |view|. +- (NSPoint)flipWindowPointToView:(const NSPoint&)windowPoint + view:(NSView*)view; +// Given a point in window coordinates and a view in that window, return a +// flipped point in screen coordinates. +- (NSPoint)flipWindowPointToScreen:(const NSPoint&)windowPoint + view:(NSView*)view; +@end diff --git a/chrome/browser/cocoa/web_drop_target.mm b/chrome/browser/cocoa/web_drop_target.mm new file mode 100644 index 0000000..8d450a6 --- /dev/null +++ b/chrome/browser/cocoa/web_drop_target.mm @@ -0,0 +1,209 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "chrome/browser/cocoa/web_drop_target.h" + +#include "base/sys_string_conversions.h" +#include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/browser/tab_contents/tab_contents.h" +#import "third_party/mozilla/include/NSPasteboard+Utils.h" +#include "webkit/glue/webdropdata.h" +#include "webkit/glue/window_open_disposition.h" + +@implementation WebDropTarget + +// |contents| is the TabContents representing this tab, used to communicate +// drag&drop messages to WebCore and handle navigation on a successful drop +// (if necessary). +- (id)initWithTabContents:(TabContents*)contents { + if ((self = [super init])) { + tabContents_ = contents; + } + return self; +} + +// Call to set whether or not we should allow the drop. Takes effect the +// next time |-draggingUpdated:| is called. +- (void)setIsDropTarget:(BOOL)isDropTarget { + isDropTarget_ = isDropTarget; +} + +// Given a point in window coordinates and a view in that window, return a +// flipped point in the coordinate system of |view|. +- (NSPoint)flipWindowPointToView:(const NSPoint&)windowPoint + view:(NSView*)view { + DCHECK(view); + NSPoint viewPoint = [view convertPoint:windowPoint fromView:nil]; + NSRect viewFrame = [view frame]; + viewPoint.y = viewFrame.size.height - viewPoint.y; + return viewPoint; +} + +// Given a point in window coordinates and a view in that window, return a +// flipped point in screen coordinates. +- (NSPoint)flipWindowPointToScreen:(const NSPoint&)windowPoint + view:(NSView*)view { + DCHECK(view); + NSPoint screenPoint = [[view window] convertBaseToScreen:windowPoint]; + NSScreen* screen = [[view window] screen]; + NSRect screenFrame = [screen frame]; + screenPoint.y = screenFrame.size.height - screenPoint.y; + return screenPoint; +} + +// Return YES if the drop site only allows drops that would navigate. If this +// is the case, we don't want to pass messages to the renderer because there's +// really no point (i.e., there's nothing that cares about the mouse position or +// entering and exiting). One example is an interstitial page (e.g., safe +// browsing warning). +- (BOOL)onlyAllowsNavigation { + return tabContents_->showing_interstitial_page(); +} + +// Messages to send during the tracking of a drag, ususally upon recieving +// calls from the view system. Communicates the drag messages to WebCore. + +- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info + view:(NSView*)view { + // Save off the RVH so we can tell if it changes during a drag. If it does, + // we need to send a new enter message in draggingUpdated:. + currentRVH_ = tabContents_->render_view_host(); + + if ([self onlyAllowsNavigation]) { + if ([[info draggingPasteboard] containsURLData]) + return NSDragOperationCopy; + return NSDragOperationNone; + } + + // Fill out a WebDropData from pasteboard. + WebDropData data; + [self populateWebDropData:&data fromPasteboard:[info draggingPasteboard]]; + + // Create the appropriate mouse locations for WebCore. The draggingLocation + // is in window coordinates. Both need to be flipped. + NSPoint windowPoint = [info draggingLocation]; + NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view]; + NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view]; + tabContents_->render_view_host()->DragTargetDragEnter(data, + gfx::Point(viewPoint.x, viewPoint.y), + gfx::Point(screenPoint.x, screenPoint.y)); + + isDropTarget_ = YES; + + return NSDragOperationCopy; +} + +- (void)draggingExited:(id<NSDraggingInfo>)info { + DCHECK(currentRVH_); + if (currentRVH_ != tabContents_->render_view_host()) + return; + + // Nothing to do in the interstitial case. + + tabContents_->render_view_host()->DragTargetDragLeave(); +} + +- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)info + view:(NSView*)view { + DCHECK(currentRVH_); + if (currentRVH_ != tabContents_->render_view_host()) + [self draggingEntered:info]; + + if ([self onlyAllowsNavigation]) { + if ([[info draggingPasteboard] containsURLData]) + return NSDragOperationCopy; + return NSDragOperationNone; + } + + // Create the appropriate mouse locations for WebCore. The draggingLocation + // is in window coordinates. + NSPoint windowPoint = [info draggingLocation]; + NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view]; + NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view]; + tabContents_->render_view_host()->DragTargetDragOver( + gfx::Point(viewPoint.x, viewPoint.y), + gfx::Point(screenPoint.x, screenPoint.y)); + + if (!isDropTarget_) + return NSDragOperationNone; + return NSDragOperationCopy; +} + +- (BOOL)performDragOperation:(id<NSDraggingInfo>)info + view:(NSView*)view { + if (currentRVH_ != tabContents_->render_view_host()) + [self draggingEntered:info]; + + // Check if we only allow navigation and navigate to a url on the pasteboard. + if ([self onlyAllowsNavigation]) { + NSPasteboard* pboard = [info draggingPasteboard]; + if ([pboard containsURLData]) { + WebDropData data; + [self populateURLAndTitle:&data fromPasteboard:pboard]; + tabContents_->OpenURL(data.url, GURL(), CURRENT_TAB, + PageTransition::AUTO_BOOKMARK); + return YES; + } + return NO; + } + + currentRVH_ = NULL; + + // Create the appropriate mouse locations for WebCore. The draggingLocation + // is in window coordinates. Both need to be flipped. + NSPoint windowPoint = [info draggingLocation]; + NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view]; + NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view]; + tabContents_->render_view_host()->DragTargetDrop( + gfx::Point(viewPoint.x, viewPoint.y), + gfx::Point(screenPoint.x, screenPoint.y)); + + return YES; +} + +// Populate the URL portion of |data|. There may be more than one, but we only +// handle dropping the first. |data| must not be NULL. Assumes the caller has +// already called |-containsURLData|. +- (void)populateURLAndTitle:(WebDropData*)data + fromPasteboard:(NSPasteboard*)pboard { + DCHECK(data); + DCHECK([pboard containsURLData]); + + // The getURLs:andTitles: will already validate URIs so we don't need to + // again. The arrays it returns are both of NSString's. + NSArray* urls = nil; + NSArray* titles = nil; + [pboard getURLs:&urls andTitles:&titles]; + data->url = GURL([[urls objectAtIndex:0] UTF8String]); + data->url_title = base::SysNSStringToUTF16([titles objectAtIndex:0]); +} + +// Given |data|, which should not be nil, fill it in using the contents of the +// given pasteboard. +- (void)populateWebDropData:(WebDropData*)data + fromPasteboard:(NSPasteboard*)pboard { + DCHECK(data); + DCHECK(pboard); + NSArray* types = [pboard types]; + + // Get URL. + if ([pboard containsURLData]) + [self populateURLAndTitle:data fromPasteboard:pboard]; + + // Get plain text. + if ([types containsObject:NSStringPboardType]) { + data->plain_text = + base::SysNSStringToUTF16([pboard stringForType:NSStringPboardType]); + } + + // Get HTML. + if ([types containsObject:NSHTMLPboardType]) { + data->text_html = + base::SysNSStringToUTF16([pboard stringForType:NSHTMLPboardType]); + } + + // TODO(pinkerton): Get files and file contents. +} + +@end diff --git a/chrome/browser/cocoa/web_drop_target_unittest.mm b/chrome/browser/cocoa/web_drop_target_unittest.mm new file mode 100644 index 0000000..c1f174c --- /dev/null +++ b/chrome/browser/cocoa/web_drop_target_unittest.mm @@ -0,0 +1,106 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/scoped_nsautorelease_pool.h" +#include "base/sys_string_conversions.h" +#import "chrome/browser/cocoa/cocoa_test_helper.h" +#import "chrome/browser/cocoa/web_drop_target.h" +#include "chrome/browser/renderer_host/test/test_render_view_host.h" +#include "testing/gtest/include/gtest/gtest.h" +#import "third_party/mozilla/include/NSPasteboard+Utils.h" +#include "webkit/glue/webdropdata.h" + +class WebDropTargetTest : public RenderViewHostTestHarness { + public: + WebDropTargetTest() { + RenderViewHostTestHarness::SetUp(); + drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]); + } + + virtual ~WebDropTargetTest() { + RenderViewHostTestHarness::TearDown(); + + } + + void PutURLOnPasteboard(NSString* urlString, NSPasteboard* pboard) { + [pboard declareTypes:[NSArray arrayWithObject:NSURLPboardType] + owner:nil]; + NSURL* url = [NSURL URLWithString:urlString]; + EXPECT_TRUE(url); + [url writeToPasteboard:pboard]; + } + + base::ScopedNSAutoreleasePool pool_; + CocoaTestHelper cocoa_helper_; + scoped_nsobject<WebDropTarget> drop_target_; +}; + +// Make sure nothing leaks. +TEST_F(WebDropTargetTest, Init) { + EXPECT_TRUE(drop_target_); +} + +// Test flipping of coordinates given a point in window coordinates. +TEST_F(WebDropTargetTest, Flip) { + NSPoint windowPoint = NSZeroPoint; + NSPoint viewPoint = + [drop_target_ flipWindowPointToView:windowPoint + view:cocoa_helper_.contentView()]; + NSPoint screenPoint = + [drop_target_ flipWindowPointToScreen:windowPoint + view:cocoa_helper_.contentView()]; + EXPECT_EQ(viewPoint.x, 0); + EXPECT_EQ(viewPoint.y, 600); + EXPECT_EQ(screenPoint.x, 0); + // We can't put a value on the screen size since everyone will have a + // different one. + EXPECT_NE(screenPoint.y, 0); +} + +TEST_F(WebDropTargetTest, URL) { + WebDropData data; + + // Put a URL on the pasteboard and check it. + NSPasteboard* pboard = [NSPasteboard pasteboardWithUniqueName]; + PutURLOnPasteboard(@"http://www.google.com", pboard); + [drop_target_ populateURLAndTitle:&data fromPasteboard:pboard]; + EXPECT_EQ(data.url.spec(), "http://www.google.com/"); + + // Put a 'url ' and 'urln' on the pasteboard and check it. + NSString* title = @"Title of Awesomeness!"; + pboard = [NSPasteboard pasteboardWithUniqueName]; + [pboard declareTypes:[NSArray arrayWithObjects:kCorePasteboardFlavorType_url, + kCorePasteboardFlavorType_urln, nil] + owner:nil]; + [pboard setString:@"http://www.something.com/" + forType:kCorePasteboardFlavorType_url]; + [pboard setString:title + forType:kCorePasteboardFlavorType_urln]; + [drop_target_ populateURLAndTitle:&data fromPasteboard:pboard]; + EXPECT_EQ(data.url.spec(), "http://www.something.com/"); + EXPECT_EQ(data.url_title, base::SysNSStringToUTF16(title)); +} + +TEST_F(WebDropTargetTest, Data) { + WebDropData data; + NSPasteboard* pboard = [NSPasteboard pasteboardWithUniqueName]; + + PutURLOnPasteboard(@"http://www.google.com", pboard); + [pboard addTypes:[NSArray arrayWithObjects:NSHTMLPboardType, + NSStringPboardType, nil] + owner:nil]; + NSString* htmlString = @"<html><body><b>hi there</b></body></html>"; + NSString* textString = @"hi there"; + [pboard setString:htmlString forType:NSHTMLPboardType]; + [pboard setString:textString forType:NSStringPboardType]; + [drop_target_ populateWebDropData:&data fromPasteboard:pboard]; + EXPECT_EQ(data.url.spec(), "http://www.google.com/"); + EXPECT_EQ(data.plain_text, base::SysNSStringToUTF16(textString)); + EXPECT_EQ(data.text_html, base::SysNSStringToUTF16(htmlString)); +} + +TEST_F(WebDropTargetTest, EnterExitDrop) { + // TODO(pinkerton): Call enter/exit/drop and see what happens. This is a bit + // harder to test. +} diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.h b/chrome/browser/tab_contents/tab_contents_view_mac.h index 563fc79..29471d5 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.h +++ b/chrome/browser/tab_contents/tab_contents_view_mac.h @@ -17,12 +17,13 @@ class FindBarMac; @class SadTabView; class TabContentsViewMac; +@class WebDropTarget; @interface TabContentsViewCocoa : BaseView { @private - TabContentsViewMac* TabContentsView_; // WEAK; owns us + TabContentsViewMac* tabContentsView_; // WEAK; owns us + scoped_nsobject<WebDropTarget> dropTarget_; } - @end // Mac-specific implementation of the TabContentsView. It owns an NSView that diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index fced871..ae464d0 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -8,6 +8,7 @@ #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. #include "chrome/browser/cocoa/nsimage_cache.h" #include "chrome/browser/cocoa/sad_tab_view.h" +#import "chrome/browser/cocoa/web_drop_target.h" #include "chrome/browser/renderer_host/render_widget_host.h" #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" #include "chrome/browser/tab_contents/render_view_context_menu_mac.h" @@ -23,6 +24,9 @@ @interface TabContentsViewCocoa (Private) - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w; - (void)processKeyboardEvent:(NSEvent*)event; +- (TabContents*)tabContents; +- (void)registerDragTypes; +- (void)setIsDropTarget:(BOOL)isTarget; @end // static @@ -156,6 +160,23 @@ NSPasteboard* TabContentsViewMac::FillDragData( } void TabContentsViewMac::StartDragging(const WebDropData& drop_data) { + // We are only allowed to call dragImage:... from inside mouseDragged:, which + // we will never be (we're called back async), but it seems that the mouse + // event is still always the proper left mouse drag, so everything works out + // in the end. However, we occasionally get spurrious "start drag" messages + // from the back-end when we shouldn't. If we go through with the drag, Cocoa + // asserts in a bad way. Just bail for now until we can figure out the root of + // why we're getting the messages. + // TODO(pinkerton): http://crbug.com/16811 + NSEvent* currentEvent = [NSApp currentEvent]; + if ([currentEvent type] != NSLeftMouseDragged) { + LOG(INFO) << "Spurious StartDragging() message"; + RenderViewHost* rvh = tab_contents()->render_view_host(); + if (rvh) + rvh->DragSourceSystemDragEnded(); + return; + } + // Create an image to use for the drag. // TODO(pinkerton): Generate the proper image. This one will do in a pinch. NSImage* dragImage = nsimage_cache::ImageNamed(@"nav.pdf"); @@ -166,7 +187,6 @@ void TabContentsViewMac::StartDragging(const WebDropData& drop_data) { // source will get notified when the drag completes (success or failure) so // it can tell the render view host the drag is done. Windows does this with // a nested event loop, we get called back. - NSEvent* currentEvent = [NSApp currentEvent]; NSPoint mousePoint = [currentEvent locationInWindow]; mousePoint = [cocoa_view_ convertPoint:mousePoint fromView:nil]; [cocoa_view_ dragImage:dragImage @@ -238,7 +258,7 @@ void TabContentsViewMac::RestoreFocus() { // TODO(avi): Could we be restoring a view that's no longer in the key view // chain? if (latent_focus_view_.get()) { - [[cocoa_view_.get() window] makeFirstResponder:latent_focus_view_.get()]; + [[cocoa_view_ window] makeFirstResponder:latent_focus_view_.get()]; latent_focus_view_.reset(); } else { // TODO(shess): If location-bar gets focus by default, this will @@ -250,7 +270,7 @@ void TabContentsViewMac::RestoreFocus() { } void TabContentsViewMac::UpdateDragCursor(bool is_drop_target) { - NOTIMPLEMENTED(); + [cocoa_view_ setIsDropTarget:is_drop_target ? YES : NO]; } void TabContentsViewMac::GotFocus() { @@ -330,13 +350,34 @@ void TabContentsViewMac::Observe(NotificationType type, - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w { self = [super initWithFrame:NSZeroRect]; if (self != nil) { - TabContentsView_ = w; + tabContentsView_ = w; + dropTarget_.reset( + [[WebDropTarget alloc] initWithTabContents:[self tabContents]]); + [self registerDragTypes]; } return self; } +- (void)dealloc { + // This probably isn't strictly necessary, but can't hurt. + [self unregisterDraggedTypes]; + [super dealloc]; +} + +// Registers for the view for the appropriate drag types. +// TODO(pinkerton): register for file drags. +- (void)registerDragTypes { + NSArray* types = [NSArray arrayWithObjects:NSStringPboardType, + NSHTMLPboardType, NSURLPboardType, nil]; + [self registerForDraggedTypes:types]; +} + +- (void)setIsDropTarget:(BOOL)isTarget { + [dropTarget_ setIsDropTarget:isTarget]; +} + - (TabContents*)tabContents { - return TabContentsView_->tab_contents(); + return tabContentsView_->tab_contents(); } - (void)processKeyboardEvent:(NSEvent*)event { @@ -404,33 +445,19 @@ void TabContentsViewMac::Observe(NotificationType type, // NSDraggingDestination methods - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender { - TabContents* tabContents = [self tabContents]; - if (tabContents->showing_interstitial_page()) { - // TODO(pinkerton): hook up dropping only urls - return NSDragOperationNone; - } - - // TODO(pinkerton): Fill this in when we're tracking drags w/in the content. - // Fill out a WebDropData from pasteboard - // Convert event point to gfx::Point - // Pass to tabContents->render_view_host()->DragTargetDragEnter(...) - - return NSDragOperationCopy; + return [dropTarget_ draggingEntered:sender view:self]; } - (void)draggingExited:(id<NSDraggingInfo>)sender { - // TODO(pinkerton): Fill this in when we're tracking drags w/in the content. + [dropTarget_ draggingExited:sender]; } - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender { - // TODO(pinkerton): Fill this in when we're tracking drags w/in the content. - return NSDragOperationCopy; + return [dropTarget_ draggingUpdated:sender view:self]; } - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { - // TODO(pinkerton): Fill this in when we're tracking drags w/in the content. - // Reject all drops until then. - return NO; + return [dropTarget_ performDragOperation:sender view:self]; } // Tons of stuff goes here, where we grab events going on in Cocoaland and send diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 623d25e..a2f39ad 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -833,6 +833,8 @@ 'browser/cocoa/toolbar_controller.mm', 'browser/cocoa/toolbar_view.h', 'browser/cocoa/toolbar_view.mm', + 'browser/cocoa/web_drop_target.h', + 'browser/cocoa/web_drop_target.mm', 'browser/command_updater.cc', 'browser/command_updater.h', 'browser/cross_site_request_manager.cc', @@ -3619,6 +3621,7 @@ 'browser/cocoa/toolbar_button_cell_unittest.mm', 'browser/cocoa/toolbar_controller_unittest.mm', 'browser/cocoa/toolbar_view_unittest.mm', + 'browser/cocoa/web_drop_target_unittest.mm', 'browser/command_updater_unittest.cc', 'browser/debugger/devtools_manager_unittest.cc', 'browser/dom_ui/dom_ui_theme_source_unittest.cc', |