diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 19:00:48 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 19:00:48 +0000 |
commit | 41d2e4af3daa1d1ca8f8cbfa6788604a4c9913b9 (patch) | |
tree | fa82bb18c231744e72ffd334217be1e256c9e849 | |
parent | 356a50ef463bb52fdd9d5700ca11b4b83d4809bc (diff) | |
download | chromium_src-41d2e4af3daa1d1ca8f8cbfa6788604a4c9913b9.zip chromium_src-41d2e4af3daa1d1ca8f8cbfa6788604a4c9913b9.tar.gz chromium_src-41d2e4af3daa1d1ca8f8cbfa6788604a4c9913b9.tar.bz2 |
Move OSExchangeData from src/app to src/ui/base/dragdrop
BUG=none
TEST=none
TBR=brettw
Review URL: http://codereview.chromium.org/6200005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71205 0039d316-1c4b-4281-b951-d872f2087c98
53 files changed, 305 insertions, 194 deletions
diff --git a/app/app.gyp b/app/app.gyp index a0435f8..62c7634 100644 --- a/app/app.gyp +++ b/app/app.gyp @@ -36,14 +36,18 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/libpng/libpng.gyp:libpng', '../third_party/zlib/zlib.gyp:zlib', - '../ui/ui.gyp:ui_base', '<(libjpeg_gyp_path):libjpeg', ], 'sources': [ + '../ui/base/animation/animation_container_unittest.cc', + '../ui/base/animation/animation_unittest.cc', + '../ui/base/animation/multi_animation_unittest.cc', + '../ui/base/animation/slide_animation_unittest.cc', + '../ui/base/clipboard/clipboard_unittest.cc', + '../ui/base/dragdrop/os_exchange_data_win_unittest.cc', 'data_pack_unittest.cc', 'l10n_util_mac_unittest.mm', 'l10n_util_unittest.cc', - 'os_exchange_data_win_unittest.cc', 'run_all_unittests.cc', 'sql/connection_unittest.cc', 'sql/statement_unittest.cc', @@ -73,7 +77,7 @@ }], ['OS!="win"', { 'sources!': [ - 'os_exchange_data_win_unittest.cc', + '../ui/base/dragdrop/os_exchange_data_win_unittest.cc', 'view_prop_unittest.cc', 'win_util_unittest.cc', ], diff --git a/app/app_base.gypi b/app/app_base.gypi index 1431ce1..2614bb4 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -89,6 +89,38 @@ }, 'sources': [ # Files that are not required for Win64 Native Client loader + '../ui/base/animation/animation.cc', + '../ui/base/animation/animation.h', + '../ui/base/animation/animation_container.cc', + '../ui/base/animation/animation_container.h', + '../ui/base/animation/animation_container_element.h', + '../ui/base/animation/animation_container_observer.h', + '../ui/base/animation/animation_delegate.h', + '../ui/base/animation/linear_animation.cc', + '../ui/base/animation/linear_animation.h', + '../ui/base/animation/multi_animation.cc', + '../ui/base/animation/multi_animation.h', + '../ui/base/animation/slide_animation.cc', + '../ui/base/animation/slide_animation.h', + '../ui/base/animation/throb_animation.cc', + '../ui/base/animation/throb_animation.h', + '../ui/base/animation/tween.cc', + '../ui/base/animation/tween.h', + '../ui/base/clipboard/clipboard.cc', + '../ui/base/clipboard/clipboard.h', + '../ui/base/clipboard/clipboard_linux.cc', + '../ui/base/clipboard/clipboard_mac.mm', + '../ui/base/clipboard/clipboard_util_win.cc', + '../ui/base/clipboard/clipboard_util_win.h', + '../ui/base/clipboard/clipboard_win.cc', + '../ui/base/clipboard/scoped_clipboard_writer.cc', + '../ui/base/clipboard/scoped_clipboard_writer.h', + '../ui/base/dragdrop/os_exchange_data_provider_gtk.cc', + '../ui/base/dragdrop/os_exchange_data_provider_gtk.h', + '../ui/base/dragdrop/os_exchange_data_provider_win.cc', + '../ui/base/dragdrop/os_exchange_data_provider_win.h', + '../ui/base/dragdrop/os_exchange_data.cc', + '../ui/base/dragdrop/os_exchange_data.h', 'active_window_watcher_x.cc', 'active_window_watcher_x.h', 'bidi_line_iterator.cc', @@ -159,12 +191,6 @@ 'menus/simple_menu_model.cc', 'menus/simple_menu_model.h', 'message_box_flags.h', - 'os_exchange_data_provider_gtk.cc', - 'os_exchange_data_provider_gtk.h', - 'os_exchange_data_provider_win.cc', - 'os_exchange_data_provider_win.h', - 'os_exchange_data.cc', - 'os_exchange_data.h', 'resource_bundle.cc', 'resource_bundle.h', 'resource_bundle_linux.cc', @@ -276,10 +302,10 @@ # Note: because of gyp predence rules this has to be defined as # 'sources/' rather than 'sources!'. 'sources/': [ - ['exclude', '^os_exchange_data.cc'], - ['exclude', '^os_exchange_data.h'], - ['exclude', '^os_exchange_data_provider_gtk.cc'], - ['exclude', '^os_exchange_data_provider_gtk.h'], + ['exclude', '^../ui/base/dragdrop/os_exchange_data.cc'], + ['exclude', '^../ui/base/dragdrop/os_exchange_data.h'], + ['exclude', '^../ui/base/dragdrop/os_exchange_data_provider_gtk.cc'], + ['exclude', '^../ui/base/dragdrop/os_exchange_data_provider_gtk.h'], ['exclude', '^drag_drop_types_gtk.cc'], ], }], @@ -287,13 +313,14 @@ # Note: because of gyp predence rules this has to be defined as # 'sources/' rather than 'sources!'. 'sources/': [ - ['include', '^os_exchange_data.cc'], + ['include', '^../ui/base/dragdrop/os_exchange_data.cc'], ], }], ], }], ['OS!="win"', { 'sources!': [ + '../ui/base/dragdrop/os_exchange_data.cc', 'drag_drop_types.h', 'gfx/gdi_util.cc', 'gfx/gdi_util.h', @@ -301,7 +328,6 @@ 'gfx/icon_util.h', 'gfx/native_theme_win.cc', 'gfx/native_theme_win.h', - 'os_exchange_data.cc', 'view_prop.cc', 'view_prop.h', 'win/iat_patch_function.cc', diff --git a/build/all.gyp b/build/all.gyp index ba9bc45..212c6c9 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -46,7 +46,6 @@ '../third_party/sqlite/sqlite.gyp:*', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:*', '../third_party/zlib/zlib.gyp:*', - '../ui/ui.gyp:*', '../webkit/support/webkit_support.gyp:*', '../webkit/webkit.gyp:*', 'util/build_util.gyp:*', diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 41ea7a9..8d4d4e2 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -14,8 +14,6 @@ #include "app/keyboard_codes.h" #include "app/l10n_util.h" #include "app/l10n_util_win.h" -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "app/win/drag_source.h" #include "app/win/drop_target.h" #include "app/win/iat_patch_function.h" @@ -50,6 +48,8 @@ #include "skia/ext/skia_utils_win.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "views/drag_utils.h" #include "views/focus/focus_util_win.h" #include "views/widget/widget.h" @@ -129,7 +129,7 @@ DWORD EditDropTarget::OnDragEnter(IDataObject* data_object, DWORD key_state, POINT cursor_position, DWORD effect) { - OSExchangeData os_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_data(new ui::OSExchangeDataProviderWin(data_object)); drag_has_url_ = os_data.HasURL(); drag_has_string_ = !drag_has_url_ && os_data.HasString(); if (drag_has_url_) { @@ -179,7 +179,7 @@ DWORD EditDropTarget::OnDrop(IDataObject* data_object, DWORD key_state, POINT cursor_position, DWORD effect) { - OSExchangeData os_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_data(new ui::OSExchangeDataProviderWin(data_object)); if (drag_has_url_) { GURL url; @@ -2418,7 +2418,7 @@ void AutocompleteEditViewWin::StartDragIfNecessary(const CPoint& point) { if (initiated_drag_ || !app::win::IsDrag(click_point_[kLeft], point)) return; - OSExchangeData data; + ui::OSExchangeData data; DWORD supported_modes = DROPEFFECT_COPY; @@ -2470,8 +2470,9 @@ void AutocompleteEditViewWin::StartDragIfNecessary(const CPoint& point) { scoped_refptr<app::win::DragSource> drag_source(new app::win::DragSource); DWORD dropped_mode; AutoReset<bool> auto_reset_in_drag(&in_drag_, true); - if (DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source, - supported_modes, &dropped_mode) == DRAGDROP_S_DROP) { + if (DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data), + drag_source, supported_modes, &dropped_mode) == + DRAGDROP_S_DROP) { if ((dropped_mode == DROPEFFECT_MOVE) && (start_text == GetText())) { ScopedFreeze freeze(this, GetTextObjectModel()); OnBeforePossibleChange(); diff --git a/chrome/browser/bookmarks/bookmark_node_data.cc b/chrome/browser/bookmarks/bookmark_node_data.cc index e51c17c..c94d207 100644 --- a/chrome/browser/bookmarks/bookmark_node_data.cc +++ b/chrome/browser/bookmarks/bookmark_node_data.cc @@ -81,13 +81,13 @@ bool BookmarkNodeData::Element::ReadFromPickle(Pickle* pickle, #if defined(TOOLKIT_VIEWS) // static -OSExchangeData::CustomFormat BookmarkNodeData::GetBookmarkCustomFormat() { - static OSExchangeData::CustomFormat format; +ui::OSExchangeData::CustomFormat BookmarkNodeData::GetBookmarkCustomFormat() { + static ui::OSExchangeData::CustomFormat format; static bool format_valid = false; if (!format_valid) { format_valid = true; - format = OSExchangeData::RegisterCustomFormat( + format = ui::OSExchangeData::RegisterCustomFormat( BookmarkNodeData::kClipboardFormatString); } return format; @@ -217,7 +217,7 @@ bool BookmarkNodeData::ClipboardContainsBookmarks() { #endif // !defined(OS_MACOSX) #if defined(TOOLKIT_VIEWS) -void BookmarkNodeData::Write(Profile* profile, OSExchangeData* data) const { +void BookmarkNodeData::Write(Profile* profile, ui::OSExchangeData* data) const { DCHECK(data); // If there is only one element and it is a URL, write the URL to the @@ -236,7 +236,7 @@ void BookmarkNodeData::Write(Profile* profile, OSExchangeData* data) const { data->SetPickledData(GetBookmarkCustomFormat(), data_pickle); } -bool BookmarkNodeData::Read(const OSExchangeData& data) { +bool BookmarkNodeData::Read(const ui::OSExchangeData& data) { elements.clear(); profile_path_.clear(); diff --git a/chrome/browser/bookmarks/bookmark_node_data.h b/chrome/browser/bookmarks/bookmark_node_data.h index 8b8310d..d45054d 100644 --- a/chrome/browser/bookmarks/bookmark_node_data.h +++ b/chrome/browser/bookmarks/bookmark_node_data.h @@ -13,7 +13,7 @@ #include "googleurl/src/gurl.h" #if defined(TOOLKIT_VIEWS) -#include "app/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data.h" #endif class BookmarkNode; @@ -74,7 +74,7 @@ struct BookmarkNodeData { BookmarkNodeData(); #if defined(TOOLKIT_VIEWS) - static OSExchangeData::CustomFormat GetBookmarkCustomFormat(); + static ui::OSExchangeData::CustomFormat GetBookmarkCustomFormat(); #endif // Created a BookmarkNodeData populated from the arguments. @@ -108,10 +108,10 @@ struct BookmarkNodeData { // use. // |profile| is used to identify which profile the data came from. Use a // value of null to indicate the data is not associated with any profile. - void Write(Profile* profile, OSExchangeData* data) const; + void Write(Profile* profile, ui::OSExchangeData* data) const; // Restores this data from the clipboard, returning true on success. - bool Read(const OSExchangeData& data); + bool Read(const ui::OSExchangeData& data); #endif // Writes the data for a drag to |pickle|. diff --git a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc index a81d0a0..88f6936 100644 --- a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc @@ -1,9 +1,7 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "base/message_loop.h" #include "base/scoped_ptr.h" #include "base/string16.h" @@ -14,6 +12,8 @@ #include "chrome/test/testing_profile.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" class BookmarkNodeDataTest : public testing::Test { public: @@ -29,9 +29,9 @@ class BookmarkNodeDataTest : public testing::Test { namespace { -OSExchangeData::Provider* CloneProvider(const OSExchangeData& data) { - return new OSExchangeDataProviderWin( - OSExchangeDataProviderWin::GetIDataObject(data)); +ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { + return new ui::OSExchangeDataProviderWin( + ui::OSExchangeDataProviderWin::GetIDataObject(data)); } } // namespace @@ -44,9 +44,9 @@ TEST_F(BookmarkNodeDataTest, InitialState) { // Makes sure reading bogus data leaves the BookmarkNodeData invalid. TEST_F(BookmarkNodeDataTest, BogusRead) { - OSExchangeData data; + ui::OSExchangeData data; BookmarkNodeData drag_data; - EXPECT_FALSE(drag_data.Read(OSExchangeData(CloneProvider(data)))); + EXPECT_FALSE(drag_data.Read(ui::OSExchangeData(CloneProvider(data)))); EXPECT_FALSE(drag_data.is_valid()); } @@ -56,11 +56,11 @@ TEST_F(BookmarkNodeDataTest, JustURL) { const GURL url("http://google.com"); const std::wstring title(L"title"); - OSExchangeData data; + ui::OSExchangeData data; data.SetURL(url, title); BookmarkNodeData drag_data; - EXPECT_TRUE(drag_data.Read(OSExchangeData(CloneProvider(data)))); + EXPECT_TRUE(drag_data.Read(ui::OSExchangeData(CloneProvider(data)))); EXPECT_TRUE(drag_data.is_valid()); ASSERT_EQ(1, drag_data.elements.size()); EXPECT_TRUE(drag_data.elements[0].is_url); @@ -86,11 +86,11 @@ TEST_F(BookmarkNodeDataTest, URL) { EXPECT_TRUE(drag_data.elements[0].is_url); EXPECT_EQ(url, drag_data.elements[0].url); EXPECT_EQ(title, WideToUTF16Hack(drag_data.elements[0].title)); - OSExchangeData data; + ui::OSExchangeData data; drag_data.Write(&profile, &data); // Now read the data back in. - OSExchangeData data2(CloneProvider(data)); + ui::OSExchangeData data2(CloneProvider(data)); BookmarkNodeData read_data; EXPECT_TRUE(read_data.Read(data2)); EXPECT_TRUE(read_data.is_valid()); @@ -130,11 +130,11 @@ TEST_F(BookmarkNodeDataTest, Group) { EXPECT_EQ(g12->GetTitle(), WideToUTF16Hack(drag_data.elements[0].title)); EXPECT_FALSE(drag_data.elements[0].is_url); - OSExchangeData data; + ui::OSExchangeData data; drag_data.Write(&profile, &data); // Now read the data back in. - OSExchangeData data2(CloneProvider(data)); + ui::OSExchangeData data2(CloneProvider(data)); BookmarkNodeData read_data; EXPECT_TRUE(read_data.Read(data2)); EXPECT_TRUE(read_data.is_valid()); @@ -168,11 +168,11 @@ TEST_F(BookmarkNodeDataTest, GroupWithChild) { BookmarkNodeData drag_data(group); - OSExchangeData data; + ui::OSExchangeData data; drag_data.Write(&profile, &data); // Now read the data back in. - OSExchangeData data2(CloneProvider(data)); + ui::OSExchangeData data2(CloneProvider(data)); BookmarkNodeData read_data; EXPECT_TRUE(read_data.Read(data2)); ASSERT_EQ(1, read_data.elements.size()); @@ -210,11 +210,11 @@ TEST_F(BookmarkNodeDataTest, MultipleNodes) { nodes.push_back(group); nodes.push_back(url_node); BookmarkNodeData drag_data(nodes); - OSExchangeData data; + ui::OSExchangeData data; drag_data.Write(&profile, &data); // Read the data back in. - OSExchangeData data2(CloneProvider(data)); + ui::OSExchangeData data2(CloneProvider(data)); BookmarkNodeData read_data; EXPECT_TRUE(read_data.Read(data2)); EXPECT_TRUE(read_data.is_valid()); diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc index 55acbbe..848215a 100644 --- a/chrome/browser/bookmarks/bookmark_utils.cc +++ b/chrome/browser/bookmarks/bookmark_utils.cc @@ -38,7 +38,7 @@ #include "views/event.h" #if defined(TOOLKIT_VIEWS) -#include "app/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/drag_utils.h" #include "views/widget/root_view.h" #include "views/widget/widget.h" @@ -325,7 +325,7 @@ void DragBookmarks(Profile* profile, #if defined(TOOLKIT_VIEWS) // Set up our OLE machinery - OSExchangeData data; + ui::OSExchangeData data; BookmarkNodeData drag_data(nodes); drag_data.Write(profile, &data); diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index 97f02b7..a7f6118 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -56,7 +56,7 @@ #include "third_party/skia/include/core/SkShader.h" #if defined(TOOLKIT_VIEWS) -#include "app/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/drag_utils.h" #endif @@ -70,12 +70,12 @@ #endif // defined(TOOLKIT_USES_GTK) #if defined(OS_WIN) -#include "app/os_exchange_data_provider_win.h" #include "app/win/drag_source.h" #include "app/win/win_util.h" #include "base/win/scoped_comptr.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/ui/views/frame/browser_view.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #endif namespace download_util { @@ -469,7 +469,7 @@ void DragDownload(const DownloadItem* download, DCHECK(download); // Set up our OLE machinery - OSExchangeData data; + ui::OSExchangeData data; if (icon) { drag_utils::CreateDragImageForFile( @@ -494,8 +494,8 @@ void DragDownload(const DownloadItem* download, // Run the drag and drop loop DWORD effects; - DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source.get(), - DROPEFFECT_COPY | DROPEFFECT_LINK, &effects); + DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data), + drag_source.get(), DROPEFFECT_COPY | DROPEFFECT_LINK, &effects); #elif defined(TOOLKIT_USES_GTK) GtkWidget* root = gtk_widget_get_toplevel(view); if (!root) diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index a626030..088ef1d 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -35,7 +35,6 @@ class GURL; class ListValue; struct NativeWebKeyboardEvent; class NavigationEntry; -class OSExchangeData; class Profile; struct RendererPreferences; class RenderProcessHost; diff --git a/chrome/browser/tab_contents/web_drop_target_win.cc b/chrome/browser/tab_contents/web_drop_target_win.cc index d358fe3..d0b8525 100644 --- a/chrome/browser/tab_contents/web_drop_target_win.cc +++ b/chrome/browser/tab_contents/web_drop_target_win.cc @@ -7,8 +7,6 @@ #include <windows.h> #include <shlobj.h> -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "chrome/browser/bookmarks/bookmark_node_data.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -17,6 +15,8 @@ #include "googleurl/src/gurl.h" #include "net/base/net_util.h" #include "ui/base/clipboard/clipboard_util_win.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "webkit/glue/webdropdata.h" #include "webkit/glue/window_open_disposition.h" @@ -110,7 +110,7 @@ DWORD WebDropTarget::OnDragEnter(IDataObject* data_object, WebDropData::PopulateWebDropData(data_object, &drop_data); if (drop_data.url.is_empty()) - OSExchangeDataProviderWin::GetPlainTextURL(data_object, &drop_data.url); + ui::OSExchangeDataProviderWin::GetPlainTextURL(data_object, &drop_data.url); drag_cursor_ = WebDragOperationNone; @@ -124,7 +124,8 @@ DWORD WebDropTarget::OnDragEnter(IDataObject* data_object, // This is non-null if tab_contents_ is showing an ExtensionDOMUI with // support for (at the moment experimental) drag and drop extensions. if (tab_contents_->GetBookmarkDragDelegate()) { - OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_exchange_data( + new ui::OSExchangeDataProviderWin(data_object)); BookmarkNodeData bookmark_drag_data; if (bookmark_drag_data.Read(os_exchange_data)) tab_contents_->GetBookmarkDragDelegate()->OnDragEnter(bookmark_drag_data); @@ -154,7 +155,8 @@ DWORD WebDropTarget::OnDragOver(IDataObject* data_object, web_drag_utils_win::WinDragOpMaskToWebDragOpMask(effects)); if (tab_contents_->GetBookmarkDragDelegate()) { - OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_exchange_data( + new ui::OSExchangeDataProviderWin(data_object)); BookmarkNodeData bookmark_drag_data; if (bookmark_drag_data.Read(os_exchange_data)) tab_contents_->GetBookmarkDragDelegate()->OnDragOver(bookmark_drag_data); @@ -175,7 +177,8 @@ void WebDropTarget::OnDragLeave(IDataObject* data_object) { } if (tab_contents_->GetBookmarkDragDelegate()) { - OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_exchange_data( + new ui::OSExchangeDataProviderWin(data_object)); BookmarkNodeData bookmark_drag_data; if (bookmark_drag_data.Read(os_exchange_data)) tab_contents_->GetBookmarkDragDelegate()->OnDragLeave(bookmark_drag_data); @@ -203,7 +206,8 @@ DWORD WebDropTarget::OnDrop(IDataObject* data_object, gfx::Point(cursor_position.x, cursor_position.y)); if (tab_contents_->GetBookmarkDragDelegate()) { - OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object)); + ui::OSExchangeData os_exchange_data( + new ui::OSExchangeDataProviderWin(data_object)); BookmarkNodeData bookmark_drag_data; if (bookmark_drag_data.Read(os_exchange_data)) tab_contents_->GetBookmarkDragDelegate()->OnDrop(bookmark_drag_data); diff --git a/chrome/browser/ui/views/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmark_bar_view.cc index fa1e444..0631169 100644 --- a/chrome/browser/ui/views/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmark_bar_view.cc @@ -10,7 +10,6 @@ #include <vector> #include "app/l10n_util.h" -#include "app/os_exchange_data.h" #include "app/resource_bundle.h" #include "app/text_elider.h" #include "base/i18n/rtl.h" @@ -43,6 +42,7 @@ #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/animation/slide_animation.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/controls/button/menu_button.h" #include "views/controls/label.h" #include "views/controls/menu/menu_item_view.h" @@ -563,10 +563,10 @@ void BookmarkBarView::PaintChildren(gfx::Canvas* canvas) { bool BookmarkBarView::GetDropFormats( int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats) { + std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { if (!model_ || !model_->IsLoaded()) return false; - *formats = OSExchangeData::URL; + *formats = ui::OSExchangeData::URL; custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat()); return true; } @@ -575,7 +575,7 @@ bool BookmarkBarView::AreDropTypesRequired() { return true; } -bool BookmarkBarView::CanDrop(const OSExchangeData& data) { +bool BookmarkBarView::CanDrop(const ui::OSExchangeData& data) { if (!model_ || !model_->IsLoaded()) return false; @@ -1109,7 +1109,7 @@ void BookmarkBarView::BookmarkNodeFavIconLoaded(BookmarkModel* model, void BookmarkBarView::WriteDragData(View* sender, const gfx::Point& press_pt, - OSExchangeData* data) { + ui::OSExchangeData* data) { UserMetrics::RecordAction(UserMetricsAction("BookmarkBar_DragButton"), profile_); @@ -1172,7 +1172,7 @@ bool BookmarkBarView::CanStartDrag(views::View* sender, } void BookmarkBarView::WriteDragData(const BookmarkNode* node, - OSExchangeData* data) { + ui::OSExchangeData* data) { DCHECK(node && data); BookmarkNodeData drag_data(node); drag_data.Write(profile_, data); diff --git a/chrome/browser/ui/views/bookmark_bar_view.h b/chrome/browser/ui/views/bookmark_bar_view.h index 1687c2e..49cec21 100644 --- a/chrome/browser/ui/views/bookmark_bar_view.h +++ b/chrome/browser/ui/views/bookmark_bar_view.h @@ -127,9 +127,9 @@ class BookmarkBarView : public DetachableToolbarView, virtual void PaintChildren(gfx::Canvas* canvas); virtual bool GetDropFormats( int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats); + std::set<ui::OSExchangeData::CustomFormat>* custom_formats); virtual bool AreDropTypesRequired(); - virtual bool CanDrop(const OSExchangeData& data); + virtual bool CanDrop(const ui::OSExchangeData& data); virtual void OnDragEntered(const views::DropTargetEvent& event); virtual int OnDragUpdated(const views::DropTargetEvent& event); virtual void OnDragExited(); @@ -347,7 +347,7 @@ class BookmarkBarView : public DetachableToolbarView, // WriteDragData to write the actual data. virtual void WriteDragData(views::View* sender, const gfx::Point& press_pt, - OSExchangeData* data); + ui::OSExchangeData* data); virtual int GetDragOperations(views::View* sender, const gfx::Point& p); @@ -356,7 +356,7 @@ class BookmarkBarView : public DetachableToolbarView, const gfx::Point& p); // Writes a BookmarkNodeData for node to data. - void WriteDragData(const BookmarkNode* node, OSExchangeData* data); + void WriteDragData(const BookmarkNode* node, ui::OSExchangeData* data); // ViewMenuDelegate method. Ends up creating a BookmarkMenuController to // show the menu. diff --git a/chrome/browser/ui/views/bookmark_menu_controller_views.cc b/chrome/browser/ui/views/bookmark_menu_controller_views.cc index fd20ec6..6f761d0 100644 --- a/chrome/browser/ui/views/bookmark_menu_controller_views.cc +++ b/chrome/browser/ui/views/bookmark_menu_controller_views.cc @@ -4,7 +4,6 @@ #include "chrome/browser/ui/views/bookmark_menu_controller_views.h" -#include "app/os_exchange_data.h" #include "app/resource_bundle.h" #include "base/stl_util-inl.h" #include "base/utf_string_conversions.h" @@ -20,6 +19,7 @@ #include "grit/app_resources.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/controls/button/menu_button.h" using views::MenuItemView; @@ -107,8 +107,8 @@ void BookmarkMenuController::ExecuteCommand(int id, int mouse_event_flags) { bool BookmarkMenuController::GetDropFormats( MenuItemView* menu, int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats) { - *formats = OSExchangeData::URL; + std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { + *formats = ui::OSExchangeData::URL; custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat()); return true; } @@ -118,7 +118,7 @@ bool BookmarkMenuController::AreDropTypesRequired(MenuItemView* menu) { } bool BookmarkMenuController::CanDrop(MenuItemView* menu, - const OSExchangeData& data) { + const ui::OSExchangeData& data) { // Only accept drops of 1 node, which is the case for all data dragged from // bookmark bar and menus. @@ -218,7 +218,7 @@ bool BookmarkMenuController::CanDrag(MenuItemView* menu) { } void BookmarkMenuController::WriteDragData(MenuItemView* sender, - OSExchangeData* data) { + ui::OSExchangeData* data) { DCHECK(sender && data); UserMetrics::RecordAction(UserMetricsAction("BookmarkBar_DragFromFolder"), diff --git a/chrome/browser/ui/views/bookmark_menu_controller_views.h b/chrome/browser/ui/views/bookmark_menu_controller_views.h index a468266..9efb847 100644 --- a/chrome/browser/ui/views/bookmark_menu_controller_views.h +++ b/chrome/browser/ui/views/bookmark_menu_controller_views.h @@ -16,22 +16,25 @@ #include "views/controls/menu/menu_delegate.h" #include "views/controls/menu/menu_item_view.h" +class BookmarkBarView; +class BookmarkContextMenu; +class BookmarkNode; +class Browser; +class PageNavigator; +class Profile; + namespace gfx { class Rect; } // namespace gfx +namespace ui { +class OSExchangeData; +} // namespace ui + namespace views { class MenuButton; } // namespace views -class BookmarkBarView; -class BookmarkContextMenu; -class BookmarkNode; -class Browser; -class OSExchangeData; -class PageNavigator; -class Profile; - // BookmarkMenuController is responsible for showing a menu of bookmarks, // each item in the menu represents a bookmark. // BookmarkMenuController deletes itself as necessary, although the menu can @@ -87,9 +90,10 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, virtual bool GetDropFormats( views::MenuItemView* menu, int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats); + std::set<ui::OSExchangeData::CustomFormat>* custom_formats); virtual bool AreDropTypesRequired(views::MenuItemView* menu); - virtual bool CanDrop(views::MenuItemView* menu, const OSExchangeData& data); + virtual bool CanDrop(views::MenuItemView* menu, + const ui::OSExchangeData& data); virtual int GetDropOperation(views::MenuItemView* item, const views::DropTargetEvent& event, DropPosition* position); @@ -102,7 +106,8 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, bool is_mouse_gesture); virtual void DropMenuClosed(views::MenuItemView* menu); virtual bool CanDrag(views::MenuItemView* menu); - virtual void WriteDragData(views::MenuItemView* sender, OSExchangeData* data); + virtual void WriteDragData(views::MenuItemView* sender, + ui::OSExchangeData* data); virtual int GetDragOperations(views::MenuItemView* sender); virtual views::MenuItemView* GetSiblingMenu( views::MenuItemView* menu, diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h index 235bede..4bce4b5 100644 --- a/chrome/browser/ui/views/browser_actions_container.h +++ b/chrome/browser/ui/views/browser_actions_container.h @@ -323,9 +323,9 @@ class BrowserActionsContainer views::View* parent, views::View* child); virtual bool GetDropFormats( - int* formats, std::set<OSExchangeData::CustomFormat>* custom_formats); + int* formats, std::set<ui::OSExchangeData::CustomFormat>* custom_formats); virtual bool AreDropTypesRequired(); - virtual bool CanDrop(const OSExchangeData& data); + virtual bool CanDrop(const ui::OSExchangeData& data); virtual void OnDragEntered(const views::DropTargetEvent& event); virtual int OnDragUpdated(const views::DropTargetEvent& event); virtual void OnDragExited(); @@ -339,7 +339,7 @@ class BrowserActionsContainer // Overridden from views::DragController: virtual void WriteDragData(View* sender, const gfx::Point& press_pt, - OSExchangeData* data); + ui::OSExchangeData* data); virtual int GetDragOperations(View* sender, const gfx::Point& p); virtual bool CanStartDrag(View* sender, const gfx::Point& press_pt, diff --git a/chrome/browser/ui/views/extensions/browser_action_drag_data.cc b/chrome/browser/ui/views/extensions/browser_action_drag_data.cc index 0be07f3..a520ebc 100644 --- a/chrome/browser/ui/views/extensions/browser_action_drag_data.cc +++ b/chrome/browser/ui/views/extensions/browser_action_drag_data.cc @@ -27,14 +27,14 @@ bool BrowserActionDragData::IsFromProfile(Profile* profile) const { #if defined(TOOLKIT_VIEWS) void BrowserActionDragData::Write( - Profile* profile, OSExchangeData* data) const { + Profile* profile, ui::OSExchangeData* data) const { DCHECK(data); Pickle data_pickle; WriteToPickle(profile, &data_pickle); data->SetPickledData(GetBrowserActionCustomFormat(), data_pickle); } -bool BrowserActionDragData::Read(const OSExchangeData& data) { +bool BrowserActionDragData::Read(const ui::OSExchangeData& data) { if (!data.HasCustomFormat(GetBrowserActionCustomFormat())) return false; @@ -49,14 +49,14 @@ bool BrowserActionDragData::Read(const OSExchangeData& data) { } // static -OSExchangeData::CustomFormat +ui::OSExchangeData::CustomFormat BrowserActionDragData::GetBrowserActionCustomFormat() { - static OSExchangeData::CustomFormat format; + static ui::OSExchangeData::CustomFormat format; static bool format_valid = false; if (!format_valid) { format_valid = true; - format = OSExchangeData::RegisterCustomFormat( + format = ui::OSExchangeData::RegisterCustomFormat( BrowserActionDragData::kClipboardFormatString); } return format; diff --git a/chrome/browser/ui/views/extensions/browser_action_drag_data.h b/chrome/browser/ui/views/extensions/browser_action_drag_data.h index 7168025..ee729b3 100644 --- a/chrome/browser/ui/views/extensions/browser_action_drag_data.h +++ b/chrome/browser/ui/views/extensions/browser_action_drag_data.h @@ -12,7 +12,7 @@ #include "chrome/browser/profiles/profile.h" #if defined(TOOLKIT_VIEWS) -#include "app/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data.h" #endif class BrowserActionButton; @@ -32,13 +32,13 @@ class BrowserActionDragData { bool IsFromProfile(Profile* profile) const; #if defined(TOOLKIT_VIEWS) - void Write(Profile* profile, OSExchangeData* data) const; + void Write(Profile* profile, ui::OSExchangeData* data) const; // Restores this data from the clipboard, returning true on success. - bool Read(const OSExchangeData& data); + bool Read(const ui::OSExchangeData& data); // Returns the Custom Format this class supports (for Browser Actions). - static OSExchangeData::CustomFormat GetBrowserActionCustomFormat(); + static ui::OSExchangeData::CustomFormat GetBrowserActionCustomFormat(); #endif private: diff --git a/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc b/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc index 370796c..0774caf 100644 --- a/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc +++ b/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "base/pickle.h" #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h" #include "chrome/test/testing_profile.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" namespace { -OSExchangeData::Provider* CloneProvider(const OSExchangeData& data) { - return new OSExchangeDataProviderWin( - OSExchangeDataProviderWin::GetIDataObject(data)); +ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { + return new ui::OSExchangeDataProviderWin( + ui::OSExchangeDataProviderWin::GetIDataObject(data)); } } // namespace @@ -25,12 +25,12 @@ TEST_F(BrowserActionDragDataTest, ArbitraryFormat) { TestingProfile profile; profile.SetID(L"id"); - OSExchangeData data; + ui::OSExchangeData data; data.SetURL(GURL("http://www.google.com"), L"Title"); // We only support our format, so this should not succeed. BrowserActionDragData drag_data; - EXPECT_FALSE(drag_data.Read(OSExchangeData(CloneProvider(data)))); + EXPECT_FALSE(drag_data.Read(ui::OSExchangeData(CloneProvider(data)))); } TEST_F(BrowserActionDragDataTest, BrowserActionDragDataFormat) { @@ -44,12 +44,12 @@ TEST_F(BrowserActionDragDataTest, BrowserActionDragDataFormat) { pickle.WriteString(extension_id); pickle.WriteInt(42); - OSExchangeData data; + ui::OSExchangeData data; data.SetPickledData(BrowserActionDragData::GetBrowserActionCustomFormat(), pickle); BrowserActionDragData drag_data; - EXPECT_TRUE(drag_data.Read(OSExchangeData(CloneProvider(data)))); + EXPECT_TRUE(drag_data.Read(ui::OSExchangeData(CloneProvider(data)))); ASSERT_TRUE(drag_data.IsFromProfile(profile.GetOriginalProfile())); ASSERT_STREQ(extension_id.c_str(), drag_data.id().c_str()); ASSERT_EQ(42, drag_data.index()); diff --git a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h index 06f8823..7d0fa1e 100644 --- a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h +++ b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h @@ -58,9 +58,9 @@ class BrowserActionOverflowMenuController : public views::MenuDelegate { virtual bool GetDropFormats( views::MenuItemView* menu, int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats); + std::set<ui::OSExchangeData::CustomFormat>* custom_formats); virtual bool AreDropTypesRequired(views::MenuItemView* menu); - virtual bool CanDrop(views::MenuItemView* menu, const OSExchangeData& data); + virtual bool CanDrop(views::MenuItemView* menu, const ui::OSExchangeData& data); virtual int GetDropOperation(views::MenuItemView* item, const views::DropTargetEvent& event, DropPosition* position); @@ -70,7 +70,7 @@ class BrowserActionOverflowMenuController : public views::MenuDelegate { // These three drag functions offer support for dragging icons out of the // overflow menu. virtual bool CanDrag(views::MenuItemView* menu); - virtual void WriteDragData(views::MenuItemView* sender, OSExchangeData* data); + virtual void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* data); virtual int GetDragOperations(views::MenuItemView* sender); private: diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc index 94c2b47..97d1a45 100644 --- a/chrome/browser/ui/views/frame/browser_root_view.cc +++ b/chrome/browser/ui/views/frame/browser_root_view.cc @@ -6,7 +6,6 @@ #include "app/drag_drop_types.h" #include "app/l10n_util.h" -#include "app/os_exchange_data.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/autocomplete/autocomplete_classifier.h" @@ -17,6 +16,7 @@ #include "chrome/browser/ui/views/frame/browser_frame.h" #include "chrome/browser/ui/views/tabs/tab_strip.h" #include "grit/chromium_strings.h" +#include "ui/base/dragdrop/os_exchange_data.h" BrowserRootView::BrowserRootView(BrowserView* browser_view, views::Widget* widget) @@ -28,9 +28,9 @@ BrowserRootView::BrowserRootView(BrowserView* browser_view, bool BrowserRootView::GetDropFormats( int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats) { + std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { if (tabstrip() && tabstrip()->IsVisible() && !tabstrip()->IsAnimating()) { - *formats = OSExchangeData::URL | OSExchangeData::STRING; + *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING; return true; } return false; @@ -40,7 +40,7 @@ bool BrowserRootView::AreDropTypesRequired() { return true; } -bool BrowserRootView::CanDrop(const OSExchangeData& data) { +bool BrowserRootView::CanDrop(const ui::OSExchangeData& data) { if (!tabstrip() || !tabstrip()->IsVisible() || tabstrip()->IsAnimating()) return false; @@ -88,19 +88,19 @@ int BrowserRootView::OnPerformDrop(const views::DropTargetEvent& event) { if (!forwarding_to_tab_strip_) return DragDropTypes::DRAG_NONE; - // Extract the URL and create a new OSExchangeData containing the URL. We do - // this as the TabStrip doesn't know about the autocomplete edit and neeeds + // Extract the URL and create a new ui::OSExchangeData containing the URL. We + // do this as the TabStrip doesn't know about the autocomplete edit and needs // to know about it to handle 'paste and go'. GURL url; std::wstring title; - OSExchangeData mapped_data; + ui::OSExchangeData mapped_data; if (!event.GetData().GetURLAndTitle(&url, &title) || !url.is_valid()) { // The url isn't valid. Use the paste and go url. if (GetPasteAndGoURL(event.GetData(), &url)) mapped_data.SetURL(url, std::wstring()); // else case: couldn't extract a url or 'paste and go' url. This ends up - // passing through an OSExchangeData with nothing in it. We need to do this - // so that the tab strip cleans up properly. + // passing through an ui::OSExchangeData with nothing in it. We need to do + // this so that the tab strip cleans up properly. } else { mapped_data.SetURL(url, std::wstring()); } @@ -124,7 +124,7 @@ bool BrowserRootView::ShouldForwardToTabStrip( views::DropTargetEvent* BrowserRootView::MapEventToTabStrip( const views::DropTargetEvent& event, - const OSExchangeData& data) { + const ui::OSExchangeData& data) { gfx::Point tab_strip_loc(event.location()); ConvertPointToView(this, tabstrip(), &tab_strip_loc); return new views::DropTargetEvent(data, tab_strip_loc.x(), @@ -136,7 +136,8 @@ BaseTabStrip* BrowserRootView::tabstrip() const { return browser_view_->tabstrip(); } -bool BrowserRootView::GetPasteAndGoURL(const OSExchangeData& data, GURL* url) { +bool BrowserRootView::GetPasteAndGoURL(const ui::OSExchangeData& data, + GURL* url) { if (!data.HasString()) return false; diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc index f4d3f9d..64265e0 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc @@ -182,7 +182,7 @@ void TabContentsDragWin::StartBackgroundDragging( void TabContentsDragWin::PrepareDragForDownload( const WebDropData& drop_data, - OSExchangeData* data, + ui::OSExchangeData* data, const GURL& page_url, const std::string& page_encoding) { // Parse the download metadata. @@ -215,16 +215,16 @@ void TabContentsDragWin::PrepareDragForDownload( page_url, page_encoding, view_->tab_contents()); - OSExchangeData::DownloadFileInfo file_download(FilePath(), - download_file.get()); + ui::OSExchangeData::DownloadFileInfo file_download(FilePath(), + download_file.get()); data->SetDownloadFileInfo(file_download); // Enable asynchronous operation. - OSExchangeDataProviderWin::GetIAsyncOperation(*data)->SetAsyncMode(TRUE); + ui::OSExchangeDataProviderWin::GetIAsyncOperation(*data)->SetAsyncMode(TRUE); } void TabContentsDragWin::PrepareDragForFileContents( - const WebDropData& drop_data, OSExchangeData* data) { + const WebDropData& drop_data, ui::OSExchangeData* data) { // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. FilePath file_name(drop_data.file_description_filename); @@ -243,7 +243,7 @@ void TabContentsDragWin::PrepareDragForFileContents( } void TabContentsDragWin::PrepareDragForUrl(const WebDropData& drop_data, - OSExchangeData* data) { + ui::OSExchangeData* data) { if (drop_data.url.SchemeIs(chrome::kJavaScriptScheme)) { // We don't want to allow javascript URLs to be dragged to the desktop, // but we do want to allow them to be added to the bookmarks bar @@ -271,13 +271,13 @@ void TabContentsDragWin::DoDragging(const WebDropData& drop_data, const std::string& page_encoding, const SkBitmap& image, const gfx::Point& image_offset) { - OSExchangeData data; + ui::OSExchangeData data; if (!drop_data.download_metadata.empty()) { PrepareDragForDownload(drop_data, &data, page_url, page_encoding); // Set the observer. - OSExchangeDataProviderWin::GetDataObjectImpl(data)->set_observer(this); + ui::OSExchangeDataProviderWin::GetDataObjectImpl(data)->set_observer(this); } else { // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over @@ -305,7 +305,7 @@ void TabContentsDragWin::DoDragging(const WebDropData& drop_data, bool old_state = MessageLoop::current()->NestableTasksAllowed(); MessageLoop::current()->SetNestableTasksAllowed(true); DWORD effect; - DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source_, + DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data), drag_source_, web_drag_utils_win::WebDragOpMaskToWinDragOpMask(ops), &effect); MessageLoop::current()->SetNestableTasksAllowed(old_state); diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h index 7e2b7c8..e05ab68 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h +++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h @@ -6,13 +6,13 @@ #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_DRAG_WIN_H_ #pragma once -#include "app/os_exchange_data_provider_win.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/threading/platform_thread.h" #include "gfx/point.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" class DragDropThread; class TabContentsViewWin; @@ -25,7 +25,7 @@ struct WebDropData; // message loop in the UI thread. For all other cases, the drag-and-drop happens // in the UI thread. class TabContentsDragWin - : public DataObjectImpl::Observer, + : public ui::DataObjectImpl::Observer, public base::RefCountedThreadSafe<TabContentsDragWin> { public: explicit TabContentsDragWin(TabContentsViewWin* view); @@ -46,12 +46,13 @@ class TabContentsDragWin private: // Called on either UI thread or drag-and-drop thread. void PrepareDragForDownload(const WebDropData& drop_data, - OSExchangeData* data, + ui::OSExchangeData* data, const GURL& page_url, const std::string& page_encoding); void PrepareDragForFileContents(const WebDropData& drop_data, - OSExchangeData* data); - void PrepareDragForUrl(const WebDropData& drop_data, OSExchangeData* data); + ui::OSExchangeData* data); + void PrepareDragForUrl(const WebDropData& drop_data, + ui::OSExchangeData* data); void DoDragging(const WebDropData& drop_data, WebKit::WebDragOperationsMask ops, const GURL& page_url, diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 06be2e9..b6104ed 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1624,7 +1624,6 @@ '../third_party/qcms/qcms.gyp:*', '../third_party/sqlite/sqlite.gyp:*', '../third_party/zlib/zlib.gyp:*', - '../ui/ui.gyp:*', '../webkit/support/webkit_support.gyp:*', '../webkit/webkit.gyp:*', diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 8b174b7..3fc5841 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -40,7 +40,6 @@ '../third_party/npapi/npapi.gyp:npapi', '../third_party/hunspell/hunspell.gyp:hunspell', '../third_party/speex/speex.gyp:libspeex', - '../ui/ui.gyp:ui_base', '../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:blob', '../webkit/support/webkit_support.gyp:database', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 163162f..54572cf 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1004,7 +1004,6 @@ '../third_party/libxml/libxml.gyp:libxml', '../third_party/npapi/npapi.gyp:npapi', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', - '../ui/ui.gyp:ui_base', ], 'include_dirs': [ '..', @@ -1,4 +1,10 @@ include_rules = [ "+gfx", + "+net", "+third_party/mozilla", + + # Temporary until all of src/app is consumed into src/ui + "+app", + "+grit/app_locale_settings.h", + "+grit/app_strings.h", ] diff --git a/app/os_exchange_data.cc b/ui/base/dragdrop/os_exchange_data.cc index a09bb83..e5701c3 100644 --- a/app/os_exchange_data.cc +++ b/ui/base/dragdrop/os_exchange_data.cc @@ -1,12 +1,14 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "base/pickle.h" #include "googleurl/src/gurl.h" +namespace ui { + OSExchangeData::DownloadFileInfo::DownloadFileInfo( const FilePath& filename, DownloadFileProvider* downloader) @@ -142,3 +144,5 @@ void OSExchangeData::SetDownloadFileInfo(const DownloadFileInfo& download) { return provider_->SetDownloadFileInfo(download); } #endif + +} // namespace ui diff --git a/app/os_exchange_data.h b/ui/base/dragdrop/os_exchange_data.h index e2b06cc..c04737d 100644 --- a/app/os_exchange_data.h +++ b/ui/base/dragdrop/os_exchange_data.h @@ -1,9 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -#ifndef APP_OS_EXCHANGE_DATA_H_ -#define APP_OS_EXCHANGE_DATA_H_ +#ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ +#define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ #pragma once #include "build/build_config.h" @@ -25,6 +25,8 @@ class GURL; class Pickle; +namespace ui { + /////////////////////////////////////////////////////////////////////////////// // // OSExchangeData @@ -192,4 +194,6 @@ class OSExchangeData { DISALLOW_COPY_AND_ASSIGN(OSExchangeData); }; -#endif // APP_OS_EXCHANGE_DATA_H_ +} // namespace ui + +#endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ diff --git a/app/os_exchange_data_provider_gtk.cc b/ui/base/dragdrop/os_exchange_data_provider_gtk.cc index 1375860..83bd600 100644 --- a/app/os_exchange_data_provider_gtk.cc +++ b/ui/base/dragdrop/os_exchange_data_provider_gtk.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/os_exchange_data_provider_gtk.h" +#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include <algorithm> @@ -11,6 +11,8 @@ #include "base/utf_string_conversions.h" #include "net/base/net_util.h" +namespace ui { + OSExchangeDataProviderGtk::OSExchangeDataProviderGtk( int known_formats, const std::set<GdkAtom>& known_custom_formats) @@ -242,3 +244,5 @@ OSExchangeData::Provider* OSExchangeData::CreateProvider() { GdkAtom OSExchangeData::RegisterCustomFormat(const std::string& type) { return gdk_atom_intern(type.c_str(), false); } + +} // namespace ui diff --git a/app/os_exchange_data_provider_gtk.h b/ui/base/dragdrop/os_exchange_data_provider_gtk.h index 276bf90..2025b98 100644 --- a/app/os_exchange_data_provider_gtk.h +++ b/ui/base/dragdrop/os_exchange_data_provider_gtk.h @@ -1,9 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -#ifndef APP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ -#define APP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ +#ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ +#define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ #pragma once #include <gtk/gtk.h> @@ -11,11 +11,13 @@ #include <set> #include <string> -#include "app/os_exchange_data.h" #include "base/pickle.h" #include "base/string16.h" #include "gfx/point.h" #include "googleurl/src/gurl.h" +#include "ui/base/dragdrop/os_exchange_data.h" + +namespace ui { // OSExchangeData::Provider implementation for Gtk. OSExchangeDataProviderGtk // is created with a set of known data types. In addition specific data @@ -113,4 +115,6 @@ class OSExchangeDataProviderGtk : public OSExchangeData::Provider { DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderGtk); }; -#endif // APP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ +} // namespace ui + +#endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_GTK_H_ diff --git a/app/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc index 8dbd7e3..f8488a3 100644 --- a/app/os_exchange_data_provider_win.cc +++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/os_exchange_data_provider_win.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "app/l10n_util.h" #include "base/file_path.h" @@ -18,7 +18,7 @@ #include "net/base/net_util.h" #include "ui/base/clipboard/clipboard_util_win.h" -using ui::ClipboardUtil; +namespace ui { // Creates a new STGMEDIUM object to hold the specified text. The caller // owns the resulting object. The "Bytes" version does not NULL terminate, the @@ -921,3 +921,5 @@ OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( const std::string& type) { return RegisterClipboardFormat(ASCIIToWide(type).c_str()); } + +} // namespace ui diff --git a/app/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h index b4cc522..dc888bd 100644 --- a/app/os_exchange_data_provider_win.h +++ b/ui/base/dragdrop/os_exchange_data_provider_win.h @@ -1,17 +1,19 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -#ifndef APP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ -#define APP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ +#ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ +#define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ #pragma once #include <objidl.h> #include <shlobj.h> #include <string> -#include "app/os_exchange_data.h" #include "base/scoped_comptr_win.h" +#include "ui/base/dragdrop/os_exchange_data.h" + +namespace ui { class DataObjectImpl : public DownloadFileObserver, public IDataObject, @@ -173,4 +175,6 @@ class OSExchangeDataProviderWin : public OSExchangeData::Provider { DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); }; -#endif // APP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ +} // namespace ui + +#endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ diff --git a/app/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc index 39fe2a6..d9509b9 100644 --- a/app/os_exchange_data_win_unittest.cc +++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "base/pickle.h" #include "base/ref_counted.h" #include "base/scoped_handle.h" @@ -14,6 +14,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/clipboard/clipboard_util_win.h" +namespace ui { + typedef testing::Test OSExchangeDataTest; namespace { @@ -371,3 +373,5 @@ TEST(OSExchangeDataTest, ProvideURLForPlainTextURL) { EXPECT_TRUE(data2.GetURLAndTitle(&read_url, &title)); EXPECT_EQ(GURL("http://google.com"), read_url); } + +} // namespace ui diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc index b324d64..31d21f0 100644 --- a/views/controls/menu/menu_controller.cc +++ b/views/controls/menu/menu_controller.cc @@ -6,11 +6,11 @@ #include "app/keyboard_codes.h" #include "app/l10n_util.h" -#include "app/os_exchange_data.h" #include "base/i18n/rtl.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "gfx/canvas_skia.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/controls/button/menu_button.h" #include "views/controls/menu/menu_scroll_view_container.h" #include "views/controls/menu/submenu_view.h" @@ -31,6 +31,7 @@ using base::Time; using base::TimeDelta; +using ui::OSExchangeData; // Period of the scroll timer (in milliseconds). static const int kScrollTimerMS = 30; diff --git a/views/controls/menu/menu_controller.h b/views/controls/menu/menu_controller.h index 234529e..0ccd4a5 100644 --- a/views/controls/menu/menu_controller.h +++ b/views/controls/menu/menu_controller.h @@ -18,7 +18,10 @@ #include "views/controls/menu/menu_delegate.h" #include "views/controls/menu/menu_item_view.h" +namespace ui { class OSExchangeData; +} +using ui::OSExchangeData; namespace views { diff --git a/views/controls/menu/menu_delegate.h b/views/controls/menu/menu_delegate.h index 8186a28..ec9b944 100644 --- a/views/controls/menu/menu_delegate.h +++ b/views/controls/menu/menu_delegate.h @@ -10,12 +10,14 @@ #include <string> #include "app/drag_drop_types.h" -#include "app/os_exchange_data.h" #include "base/logging.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/controls/menu/controller.h" #include "views/controls/menu/menu_item_view.h" #include "views/event.h" +using ui::OSExchangeData; + namespace views { class DropTargetEvent; diff --git a/views/drag_utils.cc b/views/drag_utils.cc index d249196..97cdb25 100644 --- a/views/drag_utils.cc +++ b/views/drag_utils.cc @@ -4,7 +4,6 @@ #include "views/drag_utils.h" -#include "app/os_exchange_data.h" #include "app/resource_bundle.h" #include "base/file_util.h" #include "base/logging.h" @@ -13,8 +12,11 @@ #include "gfx/font.h" #include "googleurl/src/gurl.h" #include "grit/app_resources.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/controls/button/text_button.h" +using ui::OSExchangeData; + namespace drag_utils { // Maximum width of the link drag image in pixels. diff --git a/views/drag_utils.h b/views/drag_utils.h index a8dba30..020e6bd 100644 --- a/views/drag_utils.h +++ b/views/drag_utils.h @@ -10,14 +10,19 @@ #include "base/file_path.h" +class GURL; +class SkBitmap; + namespace gfx { class Canvas; class Point; class Size; } -class GURL; + +namespace ui { class OSExchangeData; -class SkBitmap; +} +using ui::OSExchangeData; namespace drag_utils { diff --git a/views/drag_utils_gtk.cc b/views/drag_utils_gtk.cc index 8ab044b..c87d771 100644 --- a/views/drag_utils_gtk.cc +++ b/views/drag_utils_gtk.cc @@ -6,14 +6,17 @@ #include <gtk/gtk.h> -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_gtk.h" #include "base/logging.h" #include "gfx/canvas.h" #include "gfx/gtk_util.h" #include "gfx/point.h" #include "gfx/size.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" + +using ui::OSExchangeData; +using ui::OSExchangeDataProviderGtk; namespace drag_utils { diff --git a/views/drag_utils_win.cc b/views/drag_utils_win.cc index d21d37f..2a467b8 100644 --- a/views/drag_utils_win.cc +++ b/views/drag_utils_win.cc @@ -8,12 +8,15 @@ #include <shlobj.h> #include <shobjidl.h> -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "gfx/canvas_skia.h" #include "gfx/gdi_util.h" #include "gfx/skbitmap_operations.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" + +using ui::OSExchangeData; +using ui::OSExchangeDataProviderWin; namespace drag_utils { diff --git a/views/event.h b/views/event.h index 1ce8b9a..b1760b9 100644 --- a/views/event.h +++ b/views/event.h @@ -18,7 +18,10 @@ typedef struct _GdkEventKey GdkEventKey; typedef union _XEvent XEvent; #endif +namespace ui { class OSExchangeData; +} +using ui::OSExchangeData; namespace views { diff --git a/views/view.h b/views/view.h index 895e097..6b0f56c 100644 --- a/views/view.h +++ b/views/view.h @@ -14,16 +14,18 @@ #include <string> #include <vector> -#include "app/os_exchange_data.h" #include "base/i18n/rtl.h" #include "base/scoped_ptr.h" #include "gfx/native_widget_types.h" #include "gfx/rect.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/accelerator.h" #include "views/accessibility/accessibility_types.h" #include "views/background.h" #include "views/border.h" +using ui::OSExchangeData; + namespace gfx { class Canvas; class Insets; diff --git a/views/views.gyp b/views/views.gyp index 9e67f12..b8d75f9 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -52,7 +52,6 @@ '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', - '../ui/ui.gyp:ui_base', ], 'sources': [ # All .cc, .h under views, except unittests diff --git a/views/widget/drop_helper.h b/views/widget/drop_helper.h index 28c9c8f..453a04e 100644 --- a/views/widget/drop_helper.h +++ b/views/widget/drop_helper.h @@ -8,12 +8,15 @@ #include "base/basictypes.h" -class OSExchangeData; - namespace gfx { class Point; } // namespace gfx +namespace ui { +class OSExchangeData; +} // namespace ui +using ui::OSExchangeData; + namespace views { class RootView; diff --git a/views/widget/drop_target_gtk.cc b/views/widget/drop_target_gtk.cc index 8a68db8..75468ec 100644 --- a/views/widget/drop_target_gtk.cc +++ b/views/widget/drop_target_gtk.cc @@ -11,14 +11,16 @@ #include "app/drag_drop_types.h" #include "app/gtk_dnd_util.h" -#include "app/os_exchange_data_provider_gtk.h" #include "base/file_path.h" #include "base/utf_string_conversions.h" #include "gfx/point.h" #include "net/base/net_util.h" +#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "views/widget/root_view.h" #include "views/widget/widget_gtk.h" +using ui::OSExchangeData; + namespace { std::string GdkAtomToString(GdkAtom atom) { diff --git a/views/widget/drop_target_gtk.h b/views/widget/drop_target_gtk.h index d9cb011..0a3923f 100644 --- a/views/widget/drop_target_gtk.h +++ b/views/widget/drop_target_gtk.h @@ -9,11 +9,15 @@ #include <gtk/gtk.h> #include <set> -#include "app/os_exchange_data.h" #include "base/scoped_ptr.h" +#include "ui/base/dragdrop/os_exchange_data.h" #include "views/widget/drop_helper.h" +namespace ui { class OSExchangeDataProviderGtk; +} +using ui::OSExchangeData; +using ui::OSExchangeDataProviderGtk; namespace views { diff --git a/views/widget/drop_target_win.cc b/views/widget/drop_target_win.cc index e4d1069..eb5151d 100644 --- a/views/widget/drop_target_win.cc +++ b/views/widget/drop_target_win.cc @@ -5,12 +5,15 @@ #include "views/widget/drop_target_win.h" #include "app/drag_drop_types.h" -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "gfx/point.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "views/widget/root_view.h" #include "views/widget/widget.h" +using ui::OSExchangeData; +using ui::OSExchangeDataProviderWin; + namespace views { DropTargetWin::DropTargetWin(RootView* root_view) diff --git a/views/widget/root_view_win.cc b/views/widget/root_view_win.cc index 5f4a088..714afc2 100644 --- a/views/widget/root_view_win.cc +++ b/views/widget/root_view_win.cc @@ -5,10 +5,13 @@ #include "views/widget/root_view.h" #include "app/drag_drop_types.h" -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_win.h" #include "app/win/drag_source.h" #include "gfx/canvas_skia.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_win.h" + +using ui::OSExchangeData; +using ui::OSExchangeDataProviderWin; namespace views { diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 6520fea..6eb3706 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -12,13 +12,13 @@ #include <vector> #include "app/drag_drop_types.h" -#include "app/os_exchange_data.h" -#include "app/os_exchange_data_provider_gtk.h" #include "base/auto_reset.h" #include "base/compiler_specific.h" #include "base/message_loop.h" #include "base/utf_string_conversions.h" #include "gfx/path.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "views/widget/default_theme_provider.h" #include "views/widget/drop_target_gtk.h" #include "views/widget/gtk_views_fixed.h" @@ -29,6 +29,9 @@ #include "views/widget/widget_utils.h" #include "views/window/window_gtk.h" +using ui::OSExchangeData; +using ui::OSExchangeDataProviderGtk; + namespace { // g_object data keys to associate a WidgetGtk object to a GtkWidget. diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index a8a2947..77f9c97 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -15,13 +15,17 @@ #include "views/focus/focus_manager.h" #include "views/widget/widget.h" -class OSExchangeData; -class OSExchangeDataProviderGtk; - namespace gfx { class Rect; } +namespace ui { +class OSExchangeData; +class OSExchangeDataProviderGtk; +} +using ui::OSExchangeData; +using ui::OSExchangeDataProviderGtk; + namespace views { class DefaultThemeProvider; diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index b469b4e..e64f667 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -115,7 +115,6 @@ 'dependencies': [ '<(DEPTH)/app/app.gyp:app_base', '<(DEPTH)/base/base.gyp:base_i18n', - '<(DEPTH)/ui/ui.gyp:ui_base', ], 'actions': [ { @@ -158,7 +157,6 @@ '<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', - '<(DEPTH)/ui/ui.gyp:ui_base', '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', 'webkit_resources', 'webkit_strings', diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi index f33145e..c1f2fe8 100644 --- a/webkit/tools/test_shell/test_shell.gypi +++ b/webkit/tools/test_shell/test_shell.gypi @@ -39,7 +39,6 @@ '<(DEPTH)/testing/gtest.gyp:gtest', '<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:inspector_resources', '<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', - '<(DEPTH)/ui/ui.gyp:ui_base', '<(DEPTH)/webkit/support/webkit_support.gyp:appcache', '<(DEPTH)/webkit/support/webkit_support.gyp:blob', '<(DEPTH)/webkit/support/webkit_support.gyp:database', |