summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 18:27:06 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 18:27:06 +0000
commit9dd7e3d78c14f67c5c3d78868a3a63bbc4f90634 (patch)
tree3b7332926a05a1c8382eb27422c385b56b29cb24 /chrome/browser/ui
parenta12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554 (diff)
downloadchromium_src-9dd7e3d78c14f67c5c3d78868a3a63bbc4f90634.zip
chromium_src-9dd7e3d78c14f67c5c3d78868a3a63bbc4f90634.tar.gz
chromium_src-9dd7e3d78c14f67c5c3d78868a3a63bbc4f90634.tar.bz2
Move a bunch of random other files to src/ui/base
BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6257006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc10
-rw-r--r--chrome/browser/ui/app_modal_dialogs/message_box_handler.cc10
-rw-r--r--chrome/browser/ui/cocoa/background_gradient_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h5
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm10
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button.h5
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/browser_frame_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/bubble_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/chrome_browser_window.mm2
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.h2
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.mm27
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_controller.mm20
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/external_protocol_dialog.mm6
-rw-r--r--chrome/browser/ui/cocoa/gradient_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/gradient_button_cell.mm4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm14
-rw-r--r--chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm5
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/themed_window.h3
-rw-r--r--chrome/browser/ui/gtk/back_forward_button_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmark_bar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmark_bar_instructions_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmark_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmark_editor_gtk.h4
-rw-r--r--chrome/browser/ui/gtk/bookmark_menu_controller_gtk.h8
-rw-r--r--chrome/browser/ui/gtk/bookmark_utils_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.h6
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.h7
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc18
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h8
-rw-r--r--chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/constrained_window_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/crypto_module_password_dialog.cc2
-rw-r--r--chrome/browser/ui/gtk/custom_button.h2
-rw-r--r--chrome/browser/ui/gtk/custom_drag.h2
-rw-r--r--chrome/browser/ui/gtk/dialogs_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download_in_progress_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download_item_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/download_item_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download_shelf_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/edit_search_engine_dialog.h2
-rw-r--r--chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/external_protocol_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/first_run_dialog.h2
-rw-r--r--chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/gconf_titlebar_listener.h2
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_provider.cc6
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_provider.h13
-rw-r--r--chrome/browser/ui/gtk/gtk_util.cc30
-rw-r--r--chrome/browser/ui/gtk/gtk_util.h4
-rw-r--r--chrome/browser/ui/gtk/hover_controller_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/import_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/import_lock_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/info_bubble_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/infobar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/instant_confirm_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/js_modal_dialog_gtk.cc26
-rw-r--r--chrome/browser/ui/gtk/js_modal_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/menu_bar_helper.cc4
-rw-r--r--chrome/browser/ui/gtk/menu_bar_helper.h6
-rw-r--r--chrome/browser/ui/gtk/menu_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/advanced_contents_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/options/advanced_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/content_exception_editor.h2
-rw-r--r--chrome/browser/ui/gtk/options/content_exceptions_window_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/content_filter_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/content_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/content_settings_window_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/cookies_view.h2
-rw-r--r--chrome/browser/ui/gtk/options/fonts_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/general_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/languages_page_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/options/languages_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/passwords_exceptions_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/passwords_page_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/options/simple_content_exceptions_window.h2
-rw-r--r--chrome/browser/ui/gtk/options/url_picker_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/repost_form_warning_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/rounded_window.cc4
-rw-r--r--chrome/browser/ui/gtk/sad_tab_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/ssl_client_certificate_selector.cc2
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/status_icons/status_icon_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tab_contents_container_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tab_contents_drag_source.h6
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h12
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.h4
-rw-r--r--chrome/browser/ui/gtk/task_manager_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/update_recommended_dialog.h4
-rw-r--r--chrome/browser/ui/input_window_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/login/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/ui/tabs/dock_info_gtk.cc13
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc4
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmark_bar_instructions_view.cc2
-rw-r--r--chrome/browser/ui/views/bookmark_bar_view.cc8
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc2
-rw-r--r--chrome/browser/ui/views/confirm_message_box_dialog.cc12
-rw-r--r--chrome/browser/ui/views/default_search_view.cc4
-rw-r--r--chrome/browser/ui/views/detachable_toolbar_view.cc6
-rw-r--r--chrome/browser/ui/views/detachable_toolbar_view.h4
-rw-r--r--chrome/browser/ui/views/download_item_view.cc18
-rw-r--r--chrome/browser/ui/views/dropdown_bar_host.cc4
-rw-r--r--chrome/browser/ui/views/external_protocol_dialog.cc25
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/first_run_bubble.cc6
-rw-r--r--chrome/browser/ui/views/frame/browser_frame.h7
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_gtk.h6
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_win.h6
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc8
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc6
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc12
-rw-r--r--chrome/browser/ui/views/js_modal_dialog_views.cc28
-rw-r--r--chrome/browser/ui/views/js_modal_dialog_views.h4
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/options/advanced_page_view.cc11
-rw-r--r--chrome/browser/ui/views/options/exceptions_page_view.cc3
-rw-r--r--chrome/browser/ui/views/options/passwords_page_view.cc2
-rw-r--r--chrome/browser/ui/views/options/passwords_page_view.h6
-rw-r--r--chrome/browser/ui/views/repost_form_warning_view.cc10
-rw-r--r--chrome/browser/ui/views/restart_message_box.cc11
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc10
-rw-r--r--chrome/browser/ui/views/tab_icon_view.cc2
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc8
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.h4
-rw-r--r--chrome/browser/ui/views/tabs/base_tab_strip.h1
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.h2
-rw-r--r--chrome/browser/ui/views/theme_background.cc2
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc4
-rw-r--r--chrome/browser/ui/views/update_recommended_message_box.cc17
-rw-r--r--chrome/browser/ui/views/user_data_dir_dialog.cc11
169 files changed, 452 insertions, 420 deletions
diff --git a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
index 801562d..6df8d16 100644
--- a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
-#include "app/text_elider.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_shutdown.h"
@@ -14,6 +13,7 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "ipc/ipc_message.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -43,11 +43,11 @@ JavaScriptAppModalDialog::JavaScriptAppModalDialog(
// We trim the various parts of the message dialog because otherwise we can
// overflow the message dialog (and crash/hang the GTK+ version).
string16 elided_text;
- gfx::ElideRectangleString(WideToUTF16(message_text),
- kMessageTextMaxRows, kMessageTextMaxCols, &elided_text);
+ ui::ElideRectangleString(WideToUTF16(message_text),
+ kMessageTextMaxRows, kMessageTextMaxCols, &elided_text);
message_text_ = UTF16ToWide(elided_text);
- gfx::ElideString(default_prompt_text, kDefaultPromptTextSize,
- &default_prompt_text_);
+ ui::ElideString(default_prompt_text, kDefaultPromptTextSize,
+ &default_prompt_text_);
DCHECK((tab_contents_ != NULL) != (extension_host_ != NULL));
InitNotifications();
diff --git a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
index bdf7d42..6adf2b2 100644
--- a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
+++ b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
@@ -5,8 +5,6 @@
#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
-#include "app/text_elider.h"
#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
#include "build/build_config.h"
@@ -21,6 +19,8 @@
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/chromium_strings.h"
+#include "ui/base/message_box_flags.h"
+#include "ui/base/text/text_elider.h"
static std::wstring GetTitle(Profile* profile,
bool is_alert,
@@ -46,7 +46,7 @@ static std::wstring GetTitle(Profile* profile,
// TODO(brettw) it should be easier than this to do the correct language
// handling without getting the accept language from the profile.
- string16 base_address = gfx::ElideUrl(frame_url.GetOrigin(),
+ string16 base_address = ui::ElideUrl(frame_url.GetOrigin(),
gfx::Font(), 0,
UTF8ToWide(profile->GetPrefs()->GetString(prefs::kAcceptLanguages)));
@@ -68,7 +68,7 @@ void RunJavascriptMessageBox(Profile* profile,
const std::wstring& default_prompt_text,
bool display_suppress_checkbox,
IPC::Message* reply_msg) {
- bool is_alert = dialog_flags == MessageBoxFlags::kIsJavascriptAlert;
+ bool is_alert = dialog_flags == ui::MessageBoxFlags::kIsJavascriptAlert;
std::wstring title = GetTitle(profile, is_alert, frame_url);
AppModalDialogQueue::GetInstance()->AddDialog(new JavaScriptAppModalDialog(
delegate, title, dialog_flags, message_text, default_prompt_text,
@@ -84,7 +84,7 @@ void RunBeforeUnloadDialog(TabContents* tab_contents,
tab_contents,
UTF16ToWideHack(
l10n_util::GetStringUTF16(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE)),
- MessageBoxFlags::kIsJavascriptConfirm,
+ ui::MessageBoxFlags::kIsJavascriptConfirm,
message_text,
std::wstring(),
false,
diff --git a/chrome/browser/ui/cocoa/background_gradient_view.mm b/chrome/browser/ui/cocoa/background_gradient_view.mm
index 1c5735f..7b031a2 100644
--- a/chrome/browser/ui/cocoa/background_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/background_gradient_view.mm
@@ -33,7 +33,7 @@
- (void)drawBackground {
BOOL isKey = [[self window] isKeyWindow];
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[self window] themeProvider];
if (themeProvider) {
NSColor* backgroundImageColor =
themeProvider->GetNSImageColorNamed(IDR_THEME_TOOLBAR, false);
@@ -70,7 +70,7 @@
- (NSColor*)strokeColor {
BOOL isKey = [[self window] isKeyWindow];
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[self window] themeProvider];
if (!themeProvider)
return [NSColor blackColor];
return themeProvider->GetNSColor(
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
index 6406ce98..4989f57 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
@@ -386,7 +386,7 @@ willAnimateFromState:(bookmarks::VisualState)oldState
- (int64)nodeIdFromMenuTag:(int32)tag;
- (int32)menuTagFromNodeId:(int64)menuid;
- (const BookmarkNode*)nodeFromMenuItem:(id)sender;
-- (void)updateTheme:(ThemeProvider*)themeProvider;
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider;
- (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point;
- (BOOL)isEventAnExitEvent:(NSEvent*)event;
- (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 91a6ac5..04ada27 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -718,8 +718,8 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
// Called after the current theme has changed.
- (void)themeDidChangeNotification:(NSNotification*)aNotification {
- ThemeProvider* themeProvider =
- static_cast<ThemeProvider*>([[aNotification object] pointerValue]);
+ ui::ThemeProvider* themeProvider =
+ static_cast<ui::ThemeProvider*>([[aNotification object] pointerValue]);
[self updateTheme:themeProvider];
}
@@ -1103,7 +1103,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
// the hierarchy. If that second part is now true, set the color.
// (If not we'll set the color on the 1st themeChanged:
// notification.)
- ThemeProvider* themeProvider = [[[self view] window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[[self view] window] themeProvider];
if (themeProvider) {
NSColor* color =
themeProvider->GetNSColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT,
@@ -1582,7 +1582,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
// because our trigger is an [NSView viewWillMoveToWindow:], which the
// controller doesn't normally know about. Otherwise we don't have
// access to the theme before we know what window we will be on.
-- (void)updateTheme:(ThemeProvider*)themeProvider {
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider {
if (!themeProvider)
return;
NSColor* color =
@@ -1972,7 +1972,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
return tc ? tc->view()->GetContainerSize().height() : 0;
}
-- (ThemeProvider*)themeProvider {
+- (ui::ThemeProvider*)themeProvider {
return browser_->profile()->GetThemeProvider();
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
index 80f6b19..95255c8 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
@@ -4,7 +4,6 @@
#import <Cocoa/Cocoa.h>
-#include "app/theme_provider.h"
#include "base/basictypes.h"
#include "base/scoped_nsobject.h"
#include "base/string16.h"
@@ -29,6 +28,7 @@
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "ui/base/theme_provider.h"
// Just like a BookmarkBarController but openURL: is stubbed out.
@interface BookmarkBarControllerNoOpen : BookmarkBarController {
@@ -170,7 +170,7 @@
@end
-class FakeTheme : public ThemeProvider {
+class FakeTheme : public ui::ThemeProvider {
public:
FakeTheme(NSColor* color) : color_(color) { }
scoped_nsobject<NSColor> color_;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index 5044e60..53bb97d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -1407,7 +1407,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
return y;
}
-- (ThemeProvider*)themeProvider {
+- (ui::ThemeProvider*)themeProvider {
return [parentController_ themeProvider];
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h
index 1942ebd..02936ae 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h
@@ -18,7 +18,10 @@
@class BookmarkBarView;
class TabContents;
+
+namespace ui {
class ThemeProvider;
+}
// An interface to allow mocking of a BookmarkBarController by the
// BookmarkBarToolbarView.
@@ -29,7 +32,7 @@ class ThemeProvider;
- (int)currentTabContentsHeight;
// Current theme provider, passed to the cross platform NtpBackgroundUtil class.
-- (ThemeProvider*)themeProvider;
+- (ui::ThemeProvider*)themeProvider;
@end
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
index 760de17..16fb677 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h"
-#include "app/theme_provider.h"
#include "gfx/rect.h"
#include "chrome/browser/ntp_background_util.h"
#include "chrome/browser/themes/browser_theme_provider.h"
@@ -13,6 +12,7 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
#include "gfx/canvas_skia_paint.h"
+#include "ui/base/theme_provider.h"
const CGFloat kBorderRadius = 3.0;
@@ -45,7 +45,7 @@ const CGFloat kBorderRadius = 3.0;
NSRect bounds = [self bounds];
- ThemeProvider* themeProvider = [controller_ themeProvider];
+ ui::ThemeProvider* themeProvider = [controller_ themeProvider];
if (!themeProvider)
return;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
index 24d971a..ef8bfc8 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
@@ -4,7 +4,6 @@
#import <Cocoa/Cocoa.h>
-#include "app/theme_provider.h"
#include "base/scoped_nsobject.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
@@ -16,6 +15,7 @@
#include "testing/platform_test.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/base/theme_provider.h"
using ::testing::_;
using ::testing::DoAll;
@@ -23,7 +23,7 @@ using ::testing::Return;
using ::testing::SetArgumentPointee;
// When testing the floating drawing, we need to have a source of theme data.
-class MockThemeProvider : public ThemeProvider {
+class MockThemeProvider : public ui::ThemeProvider {
public:
// Cross platform methods
MOCK_METHOD1(Init, void(Profile*));
@@ -58,11 +58,11 @@ class MockThemeProvider : public ThemeProvider {
NSObject<BookmarkBarState, BookmarkBarToolbarViewController> {
@private
int currentTabContentsHeight_;
- ThemeProvider* themeProvider_;
+ ui::ThemeProvider* themeProvider_;
bookmarks::VisualState visualState_;
}
@property (nonatomic, assign) int currentTabContentsHeight;
-@property (nonatomic, assign) ThemeProvider* themeProvider;
+@property (nonatomic, assign) ui::ThemeProvider* themeProvider;
@property (nonatomic, assign) bookmarks::VisualState visualState;
// |BookmarkBarState| protocol:
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm
index 5083367..06a5443 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm
@@ -16,7 +16,7 @@
@interface BookmarkBarView (Private)
- (void)themeDidChangeNotification:(NSNotification*)aNotification;
-- (void)updateTheme:(ThemeProvider*)themeProvider;
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider;
@end
@implementation BookmarkBarView
@@ -59,7 +59,7 @@
// controller desn't have access to it until it's placed in the view
// hierarchy. This is the spot where we close the loop.
- (void)viewWillMoveToWindow:(NSWindow*)window {
- ThemeProvider* themeProvider = [window themeProvider];
+ ui::ThemeProvider* themeProvider = [window themeProvider];
[self updateTheme:themeProvider];
[controller_ updateTheme:themeProvider];
}
@@ -70,14 +70,14 @@
// Called after the current theme has changed.
- (void)themeDidChangeNotification:(NSNotification*)aNotification {
- ThemeProvider* themeProvider =
- static_cast<ThemeProvider*>([[aNotification object] pointerValue]);
+ ui::ThemeProvider* themeProvider =
+ static_cast<ui::ThemeProvider*>([[aNotification object] pointerValue]);
[self updateTheme:themeProvider];
}
// Adapt appearance to the current theme. Called after theme changes and before
// this is shown for the first time.
-- (void)updateTheme:(ThemeProvider*)themeProvider {
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider {
if (!themeProvider)
return;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.h
index 0bea5a5e..6525e8e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.h
@@ -13,7 +13,10 @@ struct BookmarkNodeData;
class BookmarkModel;
class BookmarkNode;
@class BrowserWindowController;
+
+namespace ui {
class ThemeProvider;
+}
// Protocol for a BookmarkButton's delegate, responsible for doing
// things on behalf of a bookmark button.
@@ -115,7 +118,7 @@ class ThemeProvider;
- (CGFloat)indicatorPosForDragToPoint:(NSPoint)point;
// Return the theme provider associated with this browser window.
-- (ThemeProvider*)themeProvider;
+- (ui::ThemeProvider*)themeProvider;
// Called just before a child folder puts itself on screen.
- (void)childFolderWillShow:(id<BookmarkButtonControllerProtocol>)child;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm
index c797992..7f9e616 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h"
-#include "app/text_elider.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h" // IDC_BOOKMARK_MENU
@@ -13,6 +12,7 @@
#include "chrome/browser/ui/browser.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h"
#include "chrome/browser/ui/cocoa/event_utils.h"
+#include "ui/base/text/text_elider.h"
#include "webkit/glue/window_open_disposition.h"
namespace {
@@ -29,10 +29,10 @@ const NSUInteger kMaximumMenuPixelsWide = 300;
NSFont* nsfont = [NSFont menuBarFontOfSize:0]; // 0 means "default"
gfx::Font font(base::SysNSStringToUTF16([nsfont fontName]),
static_cast<int>([nsfont pointSize]));
- string16 title = gfx::ElideText(node->GetTitle(),
- font,
- kMaximumMenuPixelsWide,
- false);
+ string16 title = ui::ElideText(node->GetTitle(),
+ font,
+ kMaximumMenuPixelsWide,
+ false);
return base::SysUTF16ToNSString(title);
}
diff --git a/chrome/browser/ui/cocoa/browser_frame_view.mm b/chrome/browser/ui/cocoa/browser_frame_view.mm
index a966785..4b6980b 100644
--- a/chrome/browser/ui/cocoa/browser_frame_view.mm
+++ b/chrome/browser/ui/cocoa/browser_frame_view.mm
@@ -212,7 +212,7 @@ static BOOL gCanGetCornerRadius = NO;
bounds:(NSRect)bounds
offset:(NSPoint)offset
forceBlackBackground:(BOOL)forceBlackBackground {
- ThemeProvider* themeProvider = [[view window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[view window] themeProvider];
if (!themeProvider)
return NO;
@@ -324,7 +324,7 @@ static BOOL gCanGetCornerRadius = NO;
}
+ (NSColor*)titleColorForThemeView:(NSView*)view {
- ThemeProvider* themeProvider = [[view window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[view window] themeProvider];
if (!themeProvider)
return [NSColor windowFrameTextColor];
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h
index 7c2347e..51424be 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.h
+++ b/chrome/browser/ui/cocoa/browser_window_controller.h
@@ -245,7 +245,7 @@ class TabContents;
- (void)updateSidebarForContents:(TabContents*)contents;
// Gets the current theme provider.
-- (ThemeProvider*)themeProvider;
+- (ui::ThemeProvider*)themeProvider;
// Gets the window style.
- (ThemedWindowStyle)themedWindowStyle;
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index d7207d6..d761f54 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1477,7 +1477,7 @@
[[self window] setViewsNeedDisplay:YES];
}
-- (ThemeProvider*)themeProvider {
+- (ui::ThemeProvider*)themeProvider {
return browser_->profile()->GetThemeProvider();
}
diff --git a/chrome/browser/ui/cocoa/bubble_view.mm b/chrome/browser/ui/cocoa/bubble_view.mm
index a888ebc..0b92f39 100644
--- a/chrome/browser/ui/cocoa/bubble_view.mm
+++ b/chrome/browser/ui/cocoa/bubble_view.mm
@@ -74,7 +74,7 @@ const float kWindowEdge = 0.7f;
float bottomRightRadius =
cornerFlags_ & kRoundedBottomRightCorner ? kBubbleCornerRadius : 0;
- ThemeProvider* themeProvider =
+ ui::ThemeProvider* themeProvider =
themeProvider_ ? [themeProvider_ themeProvider] :
[[self window] themeProvider];
diff --git a/chrome/browser/ui/cocoa/chrome_browser_window.mm b/chrome/browser/ui/cocoa/chrome_browser_window.mm
index abac221..cceeb14 100644
--- a/chrome/browser/ui/cocoa/chrome_browser_window.mm
+++ b/chrome/browser/ui/cocoa/chrome_browser_window.mm
@@ -28,7 +28,7 @@
[self setOpaque:YES];
}
-- (ThemeProvider*)themeProvider {
+- (ui::ThemeProvider*)themeProvider {
id delegate = [self delegate];
if (![delegate respondsToSelector:@selector(themeProvider)])
return NULL;
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.h b/chrome/browser/ui/cocoa/download/download_item_cell.h
index a5ffaeb..0af75f26 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.h
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.h
@@ -45,7 +45,7 @@ enum DownloadItemMousePosition {
CGFloat statusAlpha_;
scoped_nsobject<NSAnimation> hideStatusAnimation_;
- scoped_ptr<ThemeProvider> themeProvider_;
+ scoped_ptr<ui::ThemeProvider> themeProvider_;
}
- (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel;
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm
index 586252d..e4d29e6 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
#include "app/l10n_util.h"
-#include "app/text_elider.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_item_model.h"
@@ -19,6 +18,7 @@
#include "grit/theme_resources.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -85,9 +85,9 @@ const int kCompleteAnimationDuration = 2.5;
animationCurve:(NSAnimationCurve)animationCurve;
@end
-class BackgroundTheme : public ThemeProvider {
+class BackgroundTheme : public ui::ThemeProvider {
public:
- BackgroundTheme(ThemeProvider* provider);
+ BackgroundTheme(ui::ThemeProvider* provider);
virtual void Init(Profile* profile) { }
virtual SkBitmap* GetBitmapNamed(int id) const { return nil; }
@@ -103,13 +103,13 @@ public:
virtual NSGradient* GetNSGradient(int id) const;
private:
- ThemeProvider* provider_;
+ ui::ThemeProvider* provider_;
scoped_nsobject<NSGradient> buttonGradient_;
scoped_nsobject<NSGradient> buttonPressedGradient_;
scoped_nsobject<NSColor> borderColor_;
};
-BackgroundTheme::BackgroundTheme(ThemeProvider* provider) :
+BackgroundTheme::BackgroundTheme(ui::ThemeProvider* provider) :
provider_(provider) {
NSColor* bgColor = [NSColor colorWithCalibratedRed:241/255.0
green:245/255.0
@@ -168,7 +168,7 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
progressed:(NSAnimationProgress)progress;
- (NSString*)elideTitle:(int)availableWidth;
- (NSString*)elideStatus:(int)availableWidth;
-- (ThemeProvider*)backgroundThemeWrappingProvider:(ThemeProvider*)provider;
+- (ui::ThemeProvider*)backgroundThemeWrappingProvider:(ui::ThemeProvider*)provider;
- (BOOL)pressedWithDefaultThemeOnPart:(DownloadItemMousePosition)part;
- (NSColor*)titleColorForPart:(DownloadItemMousePosition)part;
- (void)drawSecondaryTitleInRect:(NSRect)innerFrame;
@@ -398,7 +398,7 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
[font pointSize]);
return base::SysUTF16ToNSString(
- ElideFilename(downloadPath_, font_chr, availableWidth));
+ ui::ElideFilename(downloadPath_, font_chr, availableWidth));
}
- (NSString*)elideStatus:(int)availableWidth {
@@ -406,14 +406,14 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]),
[font pointSize]);
- return base::SysUTF16ToNSString(ElideText(
+ return base::SysUTF16ToNSString(ui::ElideText(
base::SysNSStringToUTF16([self secondaryTitle]),
font_chr,
availableWidth,
false));
}
-- (ThemeProvider*)backgroundThemeWrappingProvider:(ThemeProvider*)provider {
+- (ui::ThemeProvider*)backgroundThemeWrappingProvider:(ui::ThemeProvider*)provider {
if (!themeProvider_.get()) {
themeProvider_.reset(new BackgroundTheme(provider));
}
@@ -423,7 +423,8 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
// Returns if |part| was pressed while the default theme was active.
- (BOOL)pressedWithDefaultThemeOnPart:(DownloadItemMousePosition)part {
- ThemeProvider* themeProvider = [[[self controlView] window] themeProvider];
+ ui::ThemeProvider* themeProvider =
+ [[[self controlView] window] themeProvider];
bool isDefaultTheme =
!themeProvider->HasCustomImage(IDR_THEME_BUTTON_BACKGROUND);
return isDefaultTheme && [self isHighlighted] && mousePosition_ == part;
@@ -431,7 +432,8 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
// Returns the text color that should be used to draw text on |part|.
- (NSColor*)titleColorForPart:(DownloadItemMousePosition)part {
- ThemeProvider* themeProvider = [[[self controlView] window] themeProvider];
+ ui::ThemeProvider* themeProvider =
+ [[[self controlView] window] themeProvider];
NSColor* themeTextColor =
themeProvider->GetNSColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT,
true);
@@ -480,7 +482,8 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const {
// with a background that looks like windows (some transparent white) if a
// theme is used. Use custom theme object with a white color gradient to trick
// the superclass into drawing what we want.
- ThemeProvider* themeProvider = [[[self controlView] window] themeProvider];
+ ui::ThemeProvider* themeProvider =
+ [[[self controlView] window] themeProvider];
bool isDefaultTheme =
!themeProvider->HasCustomImage(IDR_THEME_BUTTON_BACKGROUND);
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm
index 23603f8..80f96d8 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm
@@ -6,7 +6,6 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
#include "base/mac/mac_util.h"
#include "base/metrics/histogram.h"
#include "base/string16.h"
@@ -27,6 +26,7 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -87,7 +87,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
@interface DownloadItemController (Private)
- (void)themeDidChangeNotification:(NSNotification*)aNotification;
-- (void)updateTheme:(ThemeProvider*)themeProvider;
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider;
- (void)setState:(DownoadItemState)state;
@end
@@ -191,15 +191,15 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
// Elide giant extensions.
if (extension.length() > kFileNameMaxLength / 2) {
std::wstring wide_extension;
- gfx::ElideString(UTF8ToWide(extension), kFileNameMaxLength / 2,
- &wide_extension);
+ ui::ElideString(UTF8ToWide(extension), kFileNameMaxLength / 2,
+ &wide_extension);
extension = WideToUTF8(wide_extension);
}
// Rebuild the filename.extension.
std::wstring rootname = UTF8ToWide(filename.RemoveExtension().value());
- gfx::ElideString(rootname, kFileNameMaxLength - extension.length(),
- &rootname);
+ ui::ElideString(rootname, kFileNameMaxLength - extension.length(),
+ &rootname);
std::string new_filename = WideToUTF8(rootname);
if (extension.length())
new_filename += std::string(".") + extension;
@@ -269,7 +269,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
}
- (void)updateToolTip {
- string16 elidedFilename = gfx::ElideFilename(
+ string16 elidedFilename = ui::ElideFilename(
[self download]->GetFileNameToReportUser(),
gfx::Font(), kToolTipMaxWidth);
[progressView_ setToolTip:base::SysUTF16ToNSString(elidedFilename)];
@@ -306,14 +306,14 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
// Called after the current theme has changed.
- (void)themeDidChangeNotification:(NSNotification*)aNotification {
- ThemeProvider* themeProvider =
- static_cast<ThemeProvider*>([[aNotification object] pointerValue]);
+ ui::ThemeProvider* themeProvider =
+ static_cast<ui::ThemeProvider*>([[aNotification object] pointerValue]);
[self updateTheme:themeProvider];
}
// Adapt appearance to the current theme. Called after theme changes and before
// this is shown for the first time.
-- (void)updateTheme:(ThemeProvider*)themeProvider {
+- (void)updateTheme:(ui::ThemeProvider*)themeProvider {
NSColor* color =
themeProvider->GetNSColor(BrowserThemeProvider::COLOR_TAB_TEXT, true);
[dangerousDownloadLabel_ setTextColor:color];
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index f88071f..bede2d6 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -161,7 +161,8 @@ const NSTimeInterval kAutoCloseDelaySeconds = 5;
NSColor* color = nil;
if (bridge_.get() && bridge_->browser() && bridge_->browser()->profile()) {
- ThemeProvider* provider = bridge_->browser()->profile()->GetThemeProvider();
+ ui::ThemeProvider* provider =
+ bridge_->browser()->profile()->GetThemeProvider();
color =
provider->GetNSColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT, false);
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_view.mm b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
index f3840ef..55b88d5 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_view.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
@@ -14,7 +14,7 @@
- (NSColor*)strokeColor {
BOOL isKey = [[self window] isKeyWindow];
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[self window] themeProvider];
return themeProvider ? themeProvider->GetNSColor(
isKey ? BrowserThemeProvider::COLOR_TOOLBAR_STROKE :
BrowserThemeProvider::COLOR_TOOLBAR_STROKE_INACTIVE, true) :
@@ -23,7 +23,7 @@
- (void)drawRect:(NSRect)rect {
BOOL isKey = [[self window] isKeyWindow];
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[self window] themeProvider];
if (!themeProvider)
return;
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
index e72394b..09985c4 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/external_protocol_dialog.h"
#include "app/l10n_util_mac.h"
-#include "app/text_elider.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/string_util.h"
@@ -14,6 +13,7 @@
#include "chrome/browser/external_protocol_handler.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/text/text_elider.h"
///////////////////////////////////////////////////////////////////////////////
// ExternalProtocolHandler
@@ -62,8 +62,8 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
const int kMaxUrlWithoutSchemeSize = 256;
std::wstring elided_url_without_scheme;
- gfx::ElideString(ASCIIToWide(url_.possibly_invalid_spec()),
- kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
+ ui::ElideString(ASCIIToWide(url_.possibly_invalid_spec()),
+ kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
NSString* urlString = l10n_util::GetNSStringFWithFixup(
IDS_EXTERNAL_PROTOCOL_INFORMATION,
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.h b/chrome/browser/ui/cocoa/gradient_button_cell.h
index a1e905f..48929b5 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell.h
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.h
@@ -10,7 +10,9 @@
#include "base/scoped_nsobject.h"
+namespace ui {
class ThemeProvider;
+}
// Base class for button cells for toolbar and bookmark bar.
//
@@ -68,7 +70,7 @@ typedef enum {
// Turn off theming. Temporary work-around.
- (void)setShouldTheme:(BOOL)shouldTheme;
-- (void)drawBorderAndFillForTheme:(ThemeProvider*)themeProvider
+- (void)drawBorderAndFillForTheme:(ui::ThemeProvider*)themeProvider
controlView:(NSView*)controlView
innerPath:(NSBezierPath*)innerPath
showClickedGradient:(BOOL)showClickedGradient
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.mm b/chrome/browser/ui/cocoa/gradient_button_cell.mm
index 459aa8e..ce2ea01 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell.mm
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.mm
@@ -336,7 +336,7 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
}
// TODO(viettrungluu): clean up/reorganize.
-- (void)drawBorderAndFillForTheme:(ThemeProvider*)themeProvider
+- (void)drawBorderAndFillForTheme:(ui::ThemeProvider*)themeProvider
controlView:(NSView*)controlView
innerPath:(NSBezierPath*)innerPath
showClickedGradient:(BOOL)showClickedGradient
@@ -516,7 +516,7 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
BOOL pressed = ([((NSControl*)[self controlView]) isEnabled] &&
[self isHighlighted]);
NSWindow* window = [controlView window];
- ThemeProvider* themeProvider = [window themeProvider];
+ ui::ThemeProvider* themeProvider = [window themeProvider];
BOOL active = [window isKeyWindow] || [window isMainWindow];
// Stroke the borders and appropriate fill gradient. If we're borderless, the
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
index d6a0714..114f2c6 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
@@ -39,7 +39,7 @@ const double kBackgroundColorBottom[3] =
}
- (NSColor*)strokeColor {
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ ui::ThemeProvider* themeProvider = [[self window] themeProvider];
if (!themeProvider)
return [NSColor blackColor];
diff --git a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
index 219c448..e0fd72c 100644
--- a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
@@ -7,7 +7,6 @@
#import <Cocoa/Cocoa.h>
#include "app/l10n_util_mac.h"
-#include "app/message_box_flags.h"
#include "base/logging.h"
#import "base/mac/cocoa_protocols.h"
#include "base/sys_string_conversions.h"
@@ -15,6 +14,7 @@
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "grit/app_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
// Helper object that receives the notification that the dialog/sheet is
// going away. Is responsible for cleaning itself up.
@@ -106,10 +106,10 @@ JSModalDialogCocoa::JSModalDialogCocoa(JavaScriptAppModalDialog* dialog)
bool text_field = false;
bool one_button = false;
switch (dialog_->dialog_flags()) {
- case MessageBoxFlags::kIsJavascriptAlert:
+ case ui::MessageBoxFlags::kIsJavascriptAlert:
one_button = true;
break;
- case MessageBoxFlags::kIsJavascriptConfirm:
+ case ui::MessageBoxFlags::kIsJavascriptConfirm:
if (dialog_->is_before_unload_dialog()) {
default_button = l10n_util::GetNSStringWithFixup(
IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL);
@@ -117,7 +117,7 @@ JSModalDialogCocoa::JSModalDialogCocoa(JavaScriptAppModalDialog* dialog)
IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL);
}
break;
- case MessageBoxFlags::kIsJavascriptPrompt:
+ case ui::MessageBoxFlags::kIsJavascriptPrompt:
text_field = true;
break;
@@ -166,10 +166,10 @@ int JSModalDialogCocoa::GetAppModalDialogButtons() const {
int num_buttons = [[alert_ buttons] count];
switch (num_buttons) {
case 1:
- return MessageBoxFlags::DIALOGBUTTON_OK;
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK;
case 2:
- return MessageBoxFlags::DIALOGBUTTON_OK |
- MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK |
+ ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
default:
NOTREACHED();
return 0;
diff --git a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
index 79d794b..745e64c 100644
--- a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
@@ -4,12 +4,12 @@
#import "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h"
-#include "app/text_elider.h"
#import "base/logging.h"
#include "base/sys_string_conversions.h"
#import "chrome/browser/ui/cocoa/image_utils.h"
#import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h"
#include "gfx/font.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -92,7 +92,8 @@ CGFloat EVBubbleDecoration::GetWidthForSpace(CGFloat width) {
gfx::Font font(base::SysNSStringToUTF16([font_ fontName]),
[font_ pointSize]);
NSString* elided_label = base::SysUTF16ToNSString(
- ElideText(base::SysNSStringToUTF16(full_label_), font, width_left, true));
+ ui::ElideText(base::SysNSStringToUTF16(full_label_), font, width_left,
+ true));
// Use the elided label.
SetLabel(elided_label);
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index ffc0cb9..93837a2 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -6,7 +6,6 @@
#include <limits>
-#include "app/text_elider.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -18,6 +17,7 @@
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -152,7 +152,7 @@ void StatusBubbleMac::SetURL(const GURL& url, const string16& languages) {
[font pointSize]);
string16 original_url_text = net::FormatUrl(url, UTF16ToUTF8(languages));
- string16 status = gfx::ElideUrl(url, font_chr, text_width,
+ string16 status = ui::ElideUrl(url, font_chr, text_width,
UTF16ToWideHack(languages));
SetText(status, true);
@@ -608,7 +608,7 @@ void StatusBubbleMac::ExpandBubble() {
NSFont* font = [[window_ contentView] font];
gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]),
[font pointSize]);
- string16 expanded_url = gfx::ElideUrl(url_, font_chr,
+ string16 expanded_url = ui::ElideUrl(url_, font_chr,
max_bubble_width, UTF16ToWideHack(languages_));
// Scale width from gfx::Font in view coordinates to window coordinates.
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index 518ef21..e28e7fc 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -268,7 +268,7 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
- (void)updateTitleColor {
NSColor* titleColor = nil;
- ThemeProvider* theme = [[[self view] window] themeProvider];
+ ui::ThemeProvider* theme = [[[self view] window] themeProvider];
if (theme && ![self selected]) {
titleColor =
theme->GetNSColor(BrowserThemeProvider::COLOR_BACKGROUND_TAB_TEXT,
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index d5a2de2..7e27302 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -644,7 +644,7 @@ const CGFloat kRapidCloseDist = 2.5;
// background overlay drawn over it (see below) will be fully opaque.
BOOL hasBackgroundImage = NO;
if (!selected) {
- // ThemeProvider::HasCustomImage is true only if the theme provides the
+ // ui::ThemeProvider::HasCustomImage is true only if the theme provides the
// image. However, even if the theme doesn't provide a tab background, the
// theme machinery will make one if given a frame image. See
// BrowserThemePack::GenerateTabBackgroundImages for details.
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
index 25d8468..5497eda 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
@@ -4,11 +4,11 @@
#import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
-#include "app/theme_provider.h"
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/focus_tracker.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
+#include "ui/base/theme_provider.h"
@interface TabWindowController(PRIVATE)
- (void)setUseOverlay:(BOOL)useOverlay;
@@ -19,7 +19,7 @@
@implementation TabWindowOverlayWindow
-- (ThemeProvider*)themeProvider {
+- (ui::ThemeProvider*)themeProvider {
if ([self parentWindow])
return [[[self parentWindow] windowController] themeProvider];
return NULL;
diff --git a/chrome/browser/ui/cocoa/themed_window.h b/chrome/browser/ui/cocoa/themed_window.h
index d35bfa3..4da0d53 100644
--- a/chrome/browser/ui/cocoa/themed_window.h
+++ b/chrome/browser/ui/cocoa/themed_window.h
@@ -8,7 +8,10 @@
#import <Cocoa/Cocoa.h>
+namespace ui {
class ThemeProvider;
+}
+using ui::ThemeProvider;
// Bit flags; mix-and-match as necessary.
enum {
diff --git a/chrome/browser/ui/gtk/back_forward_button_gtk.h b/chrome/browser/ui/gtk/back_forward_button_gtk.h
index ed01b16..630e552 100644
--- a/chrome/browser/ui/gtk/back_forward_button_gtk.h
+++ b/chrome/browser/ui/gtk/back_forward_button_gtk.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_GTK_BACK_FORWARD_BUTTON_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/ui/gtk/custom_button.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
class BackForwardMenuModel;
class Browser;
diff --git a/chrome/browser/ui/gtk/bookmark_bar_gtk.h b/chrome/browser/ui/gtk/bookmark_bar_gtk.h
index f22464f..6e2261f 100644
--- a/chrome/browser/ui/gtk/bookmark_bar_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_bar_gtk.h
@@ -10,7 +10,6 @@
#include <vector>
-#include "app/gtk_signal.h"
#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_context_menu_controller.h"
@@ -25,6 +24,7 @@
#include "gfx/point.h"
#include "gfx/size.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/gtk/gtk_signal.h"
class BookmarkMenuController;
class Browser;
diff --git a/chrome/browser/ui/gtk/bookmark_bar_instructions_gtk.h b/chrome/browser/ui/gtk/bookmark_bar_instructions_gtk.h
index b430381..3cea2d6 100644
--- a/chrome/browser/ui/gtk/bookmark_bar_instructions_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_bar_instructions_gtk.h
@@ -6,10 +6,10 @@
#define CHROME_BROWSER_UI_GTK_BOOKMARK_BAR_INSTRUCTIONS_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
class GtkThemeProvider;
diff --git a/chrome/browser/ui/gtk/bookmark_bubble_gtk.h b/chrome/browser/ui/gtk/bookmark_bubble_gtk.h
index ec4f169..1b40759 100644
--- a/chrome/browser/ui/gtk/bookmark_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_bubble_gtk.h
@@ -16,7 +16,6 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
@@ -24,6 +23,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/gtk/gtk_signal.h"
class BookmarkNode;
class Profile;
diff --git a/chrome/browser/ui/gtk/bookmark_editor_gtk.h b/chrome/browser/ui/gtk/bookmark_editor_gtk.h
index b673ff6..e500ae8 100644
--- a/chrome/browser/ui/gtk/bookmark_editor_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_editor_gtk.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_UI_GTK_BOOKMARK_EDITOR_GTK_H_
#pragma once
-#include "app/gtk_integers.h"
-#include "app/gtk_signal.h"
#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
+#include "ui/base/gtk/gtk_integers.h"
+#include "ui/base/gtk/gtk_signal.h"
class GURL;
diff --git a/chrome/browser/ui/gtk/bookmark_menu_controller_gtk.h b/chrome/browser/ui/gtk/bookmark_menu_controller_gtk.h
index 46919cd..e82f828 100644
--- a/chrome/browser/ui/gtk/bookmark_menu_controller_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_menu_controller_gtk.h
@@ -8,13 +8,13 @@
#include <map>
-#include "app/gtk_integers.h"
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
#include "chrome/browser/bookmarks/bookmark_context_menu_controller.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
+#include "ui/base/gtk/gtk_integers.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
#include "webkit/glue/window_open_disposition.h"
class Browser;
@@ -137,7 +137,7 @@ class BookmarkMenuController : public BaseBookmarkModelObserver,
scoped_ptr<BookmarkContextMenuController> context_menu_controller_;
scoped_ptr<MenuGtk> context_menu_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController);
};
diff --git a/chrome/browser/ui/gtk/bookmark_utils_gtk.h b/chrome/browser/ui/gtk/bookmark_utils_gtk.h
index e662bbb..9654d9d 100644
--- a/chrome/browser/ui/gtk/bookmark_utils_gtk.h
+++ b/chrome/browser/ui/gtk/bookmark_utils_gtk.h
@@ -9,8 +9,8 @@
#include <vector>
#include <string>
-#include "app/gtk_integers.h"
#include "base/string16.h"
+#include "ui/base/gtk/gtk_integers.h"
class BookmarkModel;
class BookmarkNode;
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index bc527a4..0a0a940 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -341,7 +341,7 @@ class BrowserActionButton : public NotificationObserver,
// Same as |default_icon_|, but stored as SkBitmap.
SkBitmap default_skbitmap_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
NotificationRegistrar registrar_;
// The context menu view and model for this extension action.
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
index b61e22b..93fa6d8 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
@@ -9,8 +9,6 @@
#include <map>
#include <string>
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/linked_ptr.h"
#include "base/task.h"
#include "chrome/browser/extensions/extension_toolbar_model.h"
@@ -22,6 +20,8 @@
#include "chrome/common/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
#include "ui/base/models/simple_menu_model.h"
class Browser;
@@ -211,7 +211,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
// This is the width we were at when we started animating.
int start_width_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
NotificationRegistrar registrar_;
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 67d63f8..22b8c44 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -367,11 +367,11 @@ void BrowserTitlebar::Init() {
gtk_widget_show_all(container_);
- ActiveWindowWatcherX::AddObserver(this);
+ ui::ActiveWindowWatcherX::AddObserver(this);
}
BrowserTitlebar::~BrowserTitlebar() {
- ActiveWindowWatcherX::RemoveObserver(this);
+ ui::ActiveWindowWatcherX::RemoveObserver(this);
#if defined(USE_GCONF)
GConfTitlebarListener::GetInstance()->RemoveObserver(this);
#endif
diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h
index 944057e..2bf2f7c 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.h
+++ b/chrome/browser/ui/gtk/browser_titlebar.h
@@ -13,12 +13,12 @@
#include <gtk/gtk.h>
-#include "app/active_window_watcher_x.h"
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/models/simple_menu_model.h"
+#include "ui/base/x/active_window_watcher_x.h"
class BrowserWindowGtk;
class CustomDrawButton;
@@ -28,7 +28,7 @@ class PopupPageMenuModel;
class TabContents;
class BrowserTitlebar : public NotificationObserver,
- public ActiveWindowWatcherX::Observer,
+ public ui::ActiveWindowWatcherX::Observer,
public ui::SimpleMenuModel::Delegate {
public:
// A default button order string for when we aren't asking gconf for the
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 49d8d3d..39b3339 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -424,7 +424,7 @@ void BrowserToolbarGtk::SetUpDragForHomeButton(bool enable) {
static const int targets[] = { ui::TEXT_PLAIN, ui::TEXT_URI_LIST, -1 };
ui::SetDestTargetList(home_->widget(), targets);
- drop_handler_.reset(new GtkSignalRegistrar());
+ drop_handler_.reset(new ui::GtkSignalRegistrar());
drop_handler_->Connect(home_->widget(), "drag-data-received",
G_CALLBACK(OnDragDataReceivedThunk), this);
} else {
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
index 8483398..0a03c9b 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
@@ -9,9 +9,6 @@
#include <gtk/gtk.h>
#include <string>
-#include "app/active_window_watcher_x.h"
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/prefs/pref_member.h"
@@ -21,6 +18,8 @@
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
#include "ui/base/models/accelerator.h"
#include "ui/base/models/simple_menu_model.h"
@@ -211,7 +210,7 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
OwnedWidgetGtk offscreen_entry_;
// Manages the home button drop signal handler.
- scoped_ptr<GtkSignalRegistrar> drop_handler_;
+ scoped_ptr<ui::GtkSignalRegistrar> drop_handler_;
DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk);
};
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index c90a6b3..6b18b39 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -302,7 +302,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser)
infobar_arrow_model_(this) {
// We register first so that other views like the toolbar can use the
// is_active() function in their ActiveWindowChanged() handlers.
- ActiveWindowWatcherX::AddObserver(this);
+ ui::ActiveWindowWatcherX::AddObserver(this);
use_custom_frame_pref_.Init(prefs::kUseCustomChromeFrame,
browser_->profile()->GetPrefs(), this);
@@ -312,7 +312,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser)
// always even on the current virtual desktop. If we are running under
// compiz, suppress such raises, as they are not necessary in compiz anyway.
std::string wm_name;
- if (x11_util::GetWindowManagerName(&wm_name) && wm_name == "compiz")
+ if (ui::GetWindowManagerName(&wm_name) && wm_name == "compiz")
suppress_window_raise_ = true;
window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
@@ -348,7 +348,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser)
}
BrowserWindowGtk::~BrowserWindowGtk() {
- ActiveWindowWatcherX::RemoveObserver(this);
+ ui::ActiveWindowWatcherX::RemoveObserver(this);
browser_->tabstrip_model()->RemoveObserver(this);
}
@@ -783,7 +783,7 @@ void BrowserWindowGtk::SetFullscreen(bool fullscreen) {
// panel or not.
std::string wm_name;
bool unmaximize_before_unfullscreen = IsMaximized() &&
- x11_util::GetWindowManagerName(&wm_name) && wm_name == "Metacity";
+ ui::GetWindowManagerName(&wm_name) && wm_name == "Metacity";
if (unmaximize_before_unfullscreen)
UnMaximize();
@@ -1121,7 +1121,7 @@ gfx::Rect BrowserWindowGtk::GetInstantBounds() {
gfx::Rect BrowserWindowGtk::GrabWindowSnapshot(std::vector<unsigned char>*
png_representation) {
- x11_util::GrabWindowSnapshot(window_, png_representation);
+ ui::GrabWindowSnapshot(window_, png_representation);
return bounds_;
}
@@ -1438,7 +1438,7 @@ void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) {
bool custom_frame_default = false;
// Avoid checking the window manager if we're not connected to an X server (as
// is the case in Valgrind tests).
- if (x11_util::XDisplayExists() &&
+ if (ui::XDisplayExists() &&
!prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) {
custom_frame_default = GetCustomFramePrefDefault();
}
@@ -2066,7 +2066,7 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,
// static
void BrowserWindowGtk::MainWindowMapped(GtkWidget* widget) {
// Map the X Window ID of the window to our window.
- XID xid = x11_util::GetX11WindowFromGtkWidget(widget);
+ XID xid = ui::GetX11WindowFromGtkWidget(widget);
BrowserWindowGtk::xid_map_.insert(
std::pair<XID, GtkWindow*>(xid, GTK_WINDOW(widget)));
}
@@ -2074,7 +2074,7 @@ void BrowserWindowGtk::MainWindowMapped(GtkWidget* widget) {
// static
void BrowserWindowGtk::MainWindowUnMapped(GtkWidget* widget) {
// Unmap the X Window ID.
- XID xid = x11_util::GetX11WindowFromGtkWidget(widget);
+ XID xid = ui::GetX11WindowFromGtkWidget(widget);
BrowserWindowGtk::xid_map_.erase(xid);
}
@@ -2231,7 +2231,7 @@ void BrowserWindowGtk::PlaceBookmarkBar(bool is_floating) {
// static
bool BrowserWindowGtk::GetCustomFramePrefDefault() {
std::string wm_name;
- if (!x11_util::GetWindowManagerName(&wm_name))
+ if (!ui::GetWindowManagerName(&wm_name))
return false;
// Ideally, we'd use the custom frame by default and just fall back on using
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h
index 79f24ae..d339111 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.h
+++ b/chrome/browser/ui/gtk/browser_window_gtk.h
@@ -10,9 +10,6 @@
#include <map>
-#include "app/active_window_watcher_x.h"
-#include "app/gtk_signal.h"
-#include "app/x11_util.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "build/build_config.h"
@@ -22,6 +19,9 @@
#include "chrome/browser/ui/gtk/infobar_arrow_model.h"
#include "chrome/common/notification_registrar.h"
#include "gfx/rect.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/x/active_window_watcher_x.h"
+#include "ui/base/x/x11_util.h"
class BookmarkBarGtk;
class Browser;
@@ -44,7 +44,7 @@ class TabStripGtk;
class BrowserWindowGtk : public BrowserWindow,
public NotificationObserver,
public TabStripModelObserver,
- public ActiveWindowWatcherX::Observer,
+ public ui::ActiveWindowWatcherX::Observer,
public InfoBarArrowModel::Observer {
public:
explicit BrowserWindowGtk(Browser* browser);
diff --git a/chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h b/chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h
index 5ae0d81..567cb4b 100644
--- a/chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.h b/chrome/browser/ui/gtk/collected_cookies_gtk.h
index ce36341..afb56fe 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.h
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.h
@@ -10,13 +10,13 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class CookiesTreeModel;
diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.h b/chrome/browser/ui/gtk/constrained_window_gtk.h
index a7161ba..2f01079 100644
--- a/chrome/browser/ui/gtk/constrained_window_gtk.h
+++ b/chrome/browser/ui/gtk/constrained_window_gtk.h
@@ -8,11 +8,11 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/task.h"
#include "chrome/browser/tab_contents/constrained_window.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
class TabContents;
typedef struct _GdkColor GdkColor;
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
index da481b5..0a0b8ea 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
@@ -9,7 +9,6 @@
#include <vector>
#include "app/l10n_util.h"
-#include "app/text_elider.h"
#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/blocked_content_container.h"
@@ -27,6 +26,7 @@
#include "gfx/gtk_util.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
+#include "ui/base/text/text_elider.h"
#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -39,7 +39,7 @@ const int kContentBorder = 7;
const int kMaxLinkPixelSize = 500;
std::string BuildElidedText(const std::string& input) {
- return UTF16ToUTF8(gfx::ElideText(
+ return UTF16ToUTF8(ui::ElideText(
UTF8ToUTF16(input),
gfx::Font(),
kMaxLinkPixelSize,
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
index aa5e1a6..9427fc0 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
@@ -8,12 +8,12 @@
#include <map>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/gtk/info_bubble_gtk.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class ContentSettingBubbleModel;
class Profile;
diff --git a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h
index 3fbbc8a..b8e2957 100644
--- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/shell_integration.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GtkWidget GtkWidget;
diff --git a/chrome/browser/ui/gtk/crypto_module_password_dialog.cc b/chrome/browser/ui/gtk/crypto_module_password_dialog.cc
index 0138d38..1429e5f 100644
--- a/chrome/browser/ui/gtk/crypto_module_password_dialog.cc
+++ b/chrome/browser/ui/gtk/crypto_module_password_dialog.cc
@@ -6,7 +6,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/basictypes.h"
#include "base/crypto/crypto_module_blocking_password_delegate.h"
@@ -17,6 +16,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace {
diff --git a/chrome/browser/ui/gtk/custom_button.h b/chrome/browser/ui/gtk/custom_button.h
index 9703ba2..87c28d3 100644
--- a/chrome/browser/ui/gtk/custom_button.h
+++ b/chrome/browser/ui/gtk/custom_button.h
@@ -8,7 +8,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "chrome/common/notification_observer.h"
@@ -17,6 +16,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/gtk/gtk_signal.h"
class CairoCachedSurface;
class GtkThemeProvider;
diff --git a/chrome/browser/ui/gtk/custom_drag.h b/chrome/browser/ui/gtk/custom_drag.h
index 40916e3..d3f893b 100644
--- a/chrome/browser/ui/gtk/custom_drag.h
+++ b/chrome/browser/ui/gtk/custom_drag.h
@@ -9,8 +9,8 @@
#include <gtk/gtk.h>
#include <vector>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "ui/base/gtk/gtk_signal.h"
class BookmarkNode;
class DownloadItem;
diff --git a/chrome/browser/ui/gtk/dialogs_gtk.cc b/chrome/browser/ui/gtk/dialogs_gtk.cc
index 287116a..caab944 100644
--- a/chrome/browser/ui/gtk/dialogs_gtk.cc
+++ b/chrome/browser/ui/gtk/dialogs_gtk.cc
@@ -6,7 +6,6 @@
#include <map>
#include <set>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -19,6 +18,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/shell_dialogs.h"
#include "grit/generated_resources.h"
+#include "ui/base/gtk/gtk_signal.h"
// The size of the preview we display for selected image files. We set height
// larger than width because generally there is more free space vertically
diff --git a/chrome/browser/ui/gtk/download_in_progress_dialog_gtk.h b/chrome/browser/ui/gtk/download_in_progress_dialog_gtk.h
index c5a8a6d..dd8fdb4 100644
--- a/chrome/browser/ui/gtk/download_in_progress_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/download_in_progress_dialog_gtk.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_GTK_DOWNLOAD_IN_PROGRESS_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "ui/base/gtk/gtk_signal.h"
class Browser;
diff --git a/chrome/browser/ui/gtk/download_item_gtk.cc b/chrome/browser/ui/gtk/download_item_gtk.cc
index 755d44e..52ac648 100644
--- a/chrome/browser/ui/gtk/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download_item_gtk.cc
@@ -6,7 +6,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/metrics/histogram.h"
@@ -35,6 +34,7 @@
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -519,7 +519,7 @@ void DownloadItemGtk::LoadIcon() {
}
void DownloadItemGtk::UpdateTooltip() {
- string16 elided_filename = gfx::ElideFilename(
+ string16 elided_filename = ui::ElideFilename(
get_download()->GetFileNameToReportUser(),
gfx::Font(), kTooltipMaxWidth);
gtk_widget_set_tooltip_text(body_.get(),
@@ -531,7 +531,7 @@ void DownloadItemGtk::UpdateNameLabel() {
// use gfx::Font() to draw the text. This is why we need to add so
// much padding when we set the size request. We need to either use gfx::Font
// or somehow extend TextElider.
- string16 elided_filename = gfx::ElideFilename(
+ string16 elided_filename = ui::ElideFilename(
get_download()->GetFileNameToReportUser(),
gfx::Font(), kTextWidth);
@@ -582,7 +582,7 @@ void DownloadItemGtk::UpdateDangerWarning() {
dangerous_warning =
l10n_util::GetStringUTF16(IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION);
} else {
- string16 elided_filename = gfx::ElideFilename(
+ string16 elided_filename = ui::ElideFilename(
get_download()->target_name(), gfx::Font(), kTextWidth);
dangerous_warning =
diff --git a/chrome/browser/ui/gtk/download_item_gtk.h b/chrome/browser/ui/gtk/download_item_gtk.h
index b0c6e9c..a3b67e3 100644
--- a/chrome/browser/ui/gtk/download_item_gtk.h
+++ b/chrome/browser/ui/gtk/download_item_gtk.h
@@ -10,7 +10,6 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "chrome/browser/download/download_item.h"
@@ -19,6 +18,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/gtk/gtk_signal.h"
class BaseDownloadItemModel;
class DownloadShelfContextMenuGtk;
diff --git a/chrome/browser/ui/gtk/download_shelf_gtk.h b/chrome/browser/ui/gtk/download_shelf_gtk.h
index 650588b..aee0629 100644
--- a/chrome/browser/ui/gtk/download_shelf_gtk.h
+++ b/chrome/browser/ui/gtk/download_shelf_gtk.h
@@ -10,7 +10,6 @@
#include <vector>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
@@ -18,6 +17,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "gfx/native_widget_types.h"
+#include "ui/base/gtk/gtk_signal.h"
class BaseDownloadItemModel;
class Browser;
diff --git a/chrome/browser/ui/gtk/edit_search_engine_dialog.h b/chrome/browser/ui/gtk/edit_search_engine_dialog.h
index fea1992..a5520e1 100644
--- a/chrome/browser/ui/gtk/edit_search_engine_dialog.h
+++ b/chrome/browser/ui/gtk/edit_search_engine_dialog.h
@@ -9,10 +9,10 @@
#include <gtk/gtk.h>
#include <string>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
+#include "ui/base/gtk/gtk_signal.h"
class AccessibleWidgetHelper;
class EditSearchEngineController;
diff --git a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
index 79670c3..57f3374 100644
--- a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
@@ -9,7 +9,6 @@
#include <string>
#include "app/l10n_util.h"
-#include "app/text_elider.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/string_util.h"
@@ -19,6 +18,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -63,9 +63,9 @@ ExternalProtocolDialogGtk::ExternalProtocolDialogGtk(const GURL& url)
const int kMaxCommandSize = 256;
std::wstring elided_url_without_scheme;
std::wstring elided_command;
- gfx::ElideString(ASCIIToWide(url.possibly_invalid_spec()),
+ ui::ElideString(ASCIIToWide(url.possibly_invalid_spec()),
kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
- gfx::ElideString(ASCIIToWide(std::string("xdg-open ") + url.spec()),
+ ui::ElideString(ASCIIToWide(std::string("xdg-open ") + url.spec()),
kMaxCommandSize, &elided_command);
std::string message_text = l10n_util::GetStringFUTF8(
diff --git a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.h b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.h
index 979d5c8..d0fa3ad 100644
--- a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_GTK_EXTERNAL_PROTOCOL_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/gtk/gtk_signal.h"
class TabContents;
diff --git a/chrome/browser/ui/gtk/first_run_dialog.h b/chrome/browser/ui/gtk/first_run_dialog.h
index cd26910..0718ddf 100644
--- a/chrome/browser/ui/gtk/first_run_dialog.h
+++ b/chrome/browser/ui/gtk/first_run_dialog.h
@@ -9,9 +9,9 @@
typedef struct _GtkButton GtkButton;
typedef struct _GtkWidget GtkWidget;
-#include "app/gtk_signal.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/search_engines/template_url_model_observer.h"
+#include "ui/base/gtk/gtk_signal.h"
class TemplateURL;
class TemplateURLModel;
diff --git a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
index f5d92ef..4a55ee0 100644
--- a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
@@ -6,10 +6,10 @@
#define CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/timer.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
typedef struct _GtkFloatingContainer GtkFloatingContainer;
typedef struct _GtkWidget GtkWidget;
@@ -45,7 +45,7 @@ class FullscreenExitBubbleGtk {
// The timer that does the initial hiding of the exit bubble.
base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
};
#endif // CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
diff --git a/chrome/browser/ui/gtk/gconf_titlebar_listener.h b/chrome/browser/ui/gtk/gconf_titlebar_listener.h
index ad0c67b..179e92a 100644
--- a/chrome/browser/ui/gtk/gconf_titlebar_listener.h
+++ b/chrome/browser/ui/gtk/gconf_titlebar_listener.h
@@ -12,8 +12,8 @@
#include <set>
#include <string>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "ui/base/gtk/gtk_signal.h"
class BrowserTitlebar;
template <typename T> struct DefaultSingletonTraits;
diff --git a/chrome/browser/ui/gtk/gtk_theme_provider.cc b/chrome/browser/ui/gtk/gtk_theme_provider.cc
index 20fd4b2..055202f 100644
--- a/chrome/browser/ui/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_provider.cc
@@ -8,7 +8,6 @@
#include <set>
-#include "app/gtk_signal_registrar.h"
#include "app/resource_bundle.h"
#include "base/environment.h"
#include "base/nix/xdg_util.h"
@@ -38,6 +37,7 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkShader.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
namespace {
@@ -251,7 +251,7 @@ GtkThemeProvider::GtkThemeProvider()
: BrowserThemeProvider(),
fake_window_(gtk_window_new(GTK_WINDOW_TOPLEVEL)),
fake_frame_(chrome_gtk_frame_new()),
- signals_(new GtkSignalRegistrar),
+ signals_(new ui::GtkSignalRegistrar),
fullscreen_icon_set_(NULL) {
fake_label_.Own(gtk_label_new(""));
fake_entry_.Own(gtk_entry_new());
@@ -323,7 +323,7 @@ bool GtkThemeProvider::HasCustomImage(int id) const {
void GtkThemeProvider::InitThemesFor(NotificationObserver* observer) {
observer->Observe(NotificationType::BROWSER_THEME_CHANGED,
- Source<ThemeProvider>(this),
+ Source<ui::ThemeProvider>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/gtk/gtk_theme_provider.h b/chrome/browser/ui/gtk/gtk_theme_provider.h
index fa6b58a..b6a9e67 100644
--- a/chrome/browser/ui/gtk/gtk_theme_provider.h
+++ b/chrome/browser/ui/gtk/gtk_theme_provider.h
@@ -9,19 +9,22 @@
#include <map>
#include <vector>
-#include "app/gtk_integers.h"
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "chrome/common/notification_observer.h"
#include "gfx/color_utils.h"
+#include "ui/base/gtk/gtk_integers.h"
+#include "ui/base/gtk/gtk_signal.h"
class CairoCachedSurface;
-class GtkSignalRegistrar;
class Profile;
+namespace ui {
+class GtkSignalRegistrar;
+}
+
typedef struct _GdkDisplay GdkDisplay;
typedef struct _GdkEventExpose GdkEventExpose;
typedef struct _GdkPixbuf GdkPixbuf;
@@ -72,7 +75,7 @@ class GtkThemeProvider : public BrowserThemeProvider,
// Whether we should use the GTK system theme.
bool UseGtkTheme() const;
- // A wrapper around ThemeProvider::GetColor, transforming the result to a
+ // A wrapper around ui::ThemeProvider::GetColor, transforming the result to a
// GdkColor.
GdkColor GetGdkColor(int id) const;
@@ -256,7 +259,7 @@ class GtkThemeProvider : public BrowserThemeProvider,
std::vector<GtkWidget*> chrome_buttons_;
// Tracks all the signals we have connected to on various widgets.
- scoped_ptr<GtkSignalRegistrar> signals_;
+ scoped_ptr<ui::GtkSignalRegistrar> signals_;
// Tints and colors calculated by LoadGtkValues() that are given to the
// caller while |use_gtk_| is true.
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index 41674bc..ed3e716 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -13,7 +13,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/x11_util.h"
#include "base/environment.h"
#include "base/i18n/rtl.h"
#include "base/linux_util.h"
@@ -37,6 +36,7 @@
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/base/x/x11_util.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/frame/browser_view.h"
@@ -365,9 +365,9 @@ void CenterOverWindow(GtkWindow* window, GtkWindow* parent) {
// Move to user expected desktop if window is already visible.
if (GTK_WIDGET(window)->window) {
- x11_util::ChangeWindowDesktop(
- x11_util::GetX11WindowFromGtkWidget(GTK_WIDGET(window)),
- x11_util::GetX11WindowFromGtkWidget(GTK_WIDGET(parent)));
+ ui::ChangeWindowDesktop(
+ ui::GetX11WindowFromGtkWidget(GTK_WIDGET(window)),
+ ui::GetX11WindowFromGtkWidget(GTK_WIDGET(parent)));
}
}
@@ -546,15 +546,15 @@ bool IsScreenComposited() {
return gdk_screen_is_composited(screen) == TRUE;
}
-void EnumerateTopLevelWindows(x11_util::EnumerateWindowsDelegate* delegate) {
+void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate) {
std::vector<XID> stack;
- if (!x11_util::GetXWindowStack(&stack)) {
+ if (!ui::GetXWindowStack(&stack)) {
// Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back
// to old school enumeration of all X windows. Some WMs parent 'top-level'
// windows in unnamed actual top-level windows (ion WM), so extend the
// search depth to all children of top-level windows.
const int kMaxSearchDepth = 1;
- x11_util::EnumerateAllWindows(delegate, kMaxSearchDepth);
+ ui::EnumerateAllWindows(delegate, kMaxSearchDepth);
return;
}
@@ -857,20 +857,20 @@ void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel) {
// this -- otherwise, we'll get an error if the window manager reparents the
// toplevel window right after we call GetHighestAncestorWindow().
gdk_x11_display_grab(gtk_widget_get_display(toplevel));
- XID toplevel_window_base = x11_util::GetHighestAncestorWindow(
- x11_util::GetX11WindowFromGtkWidget(toplevel),
- x11_util::GetX11RootWindow());
+ XID toplevel_window_base = ui::GetHighestAncestorWindow(
+ ui::GetX11WindowFromGtkWidget(toplevel),
+ ui::GetX11RootWindow());
if (toplevel_window_base) {
- XID window_xid = x11_util::GetX11WindowFromGtkWidget(popup);
- XID window_parent = x11_util::GetParentWindow(window_xid);
- if (window_parent == x11_util::GetX11RootWindow()) {
- x11_util::RestackWindow(window_xid, toplevel_window_base, true);
+ XID window_xid = ui::GetX11WindowFromGtkWidget(popup);
+ XID window_parent = ui::GetParentWindow(window_xid);
+ if (window_parent == ui::GetX11RootWindow()) {
+ ui::RestackWindow(window_xid, toplevel_window_base, true);
} else {
// The window manager shouldn't reparent override-redirect windows.
DLOG(ERROR) << "override-redirect window " << window_xid
<< "'s parent is " << window_parent
<< ", rather than root window "
- << x11_util::GetX11RootWindow();
+ << ui::GetX11RootWindow();
}
}
gdk_x11_display_ungrab(gtk_widget_get_display(toplevel));
diff --git a/chrome/browser/ui/gtk/gtk_util.h b/chrome/browser/ui/gtk/gtk_util.h
index cc887bb..d51a616 100644
--- a/chrome/browser/ui/gtk/gtk_util.h
+++ b/chrome/browser/ui/gtk/gtk_util.h
@@ -10,11 +10,11 @@
#include <string>
#include <vector>
-#include "app/x11_util.h"
#include "base/string16.h"
#include "gfx/point.h"
#include "gfx/rect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
+#include "ui/base/x/x11_util.h"
#include "webkit/glue/window_open_disposition.h"
typedef struct _cairo cairo_t;
@@ -173,7 +173,7 @@ GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget,
bool IsScreenComposited();
// Enumerates the top-level gdk windows of the current display.
-void EnumerateTopLevelWindows(x11_util::EnumerateWindowsDelegate* delegate);
+void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate);
// Set that clicking the button with the given mouse buttons will cause a click
// event.
diff --git a/chrome/browser/ui/gtk/hover_controller_gtk.h b/chrome/browser/ui/gtk/hover_controller_gtk.h
index 30c2408..ae133b7 100644
--- a/chrome/browser/ui/gtk/hover_controller_gtk.h
+++ b/chrome/browser/ui/gtk/hover_controller_gtk.h
@@ -8,11 +8,11 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/animation/throb_animation.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
// This class handles the "throbbing" of a GtkChromeButton. The visual effect
// of throbbing is created by painting partially transparent hover effects. It
@@ -59,7 +59,7 @@ class HoverControllerGtk : public ui::AnimationDelegate {
ui::SlideAnimation hover_animation_;
GtkWidget* button_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
DISALLOW_COPY_AND_ASSIGN(HoverControllerGtk);
};
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.h b/chrome/browser/ui/gtk/html_dialog_gtk.h
index 391c77d..f69fa60 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.h
@@ -9,12 +9,12 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h"
#include "gfx/native_widget_types.h"
#include "gfx/size.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
diff --git a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
index 226ae96..2136e74 100644
--- a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
@@ -6,7 +6,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/process_util.h"
@@ -22,6 +21,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace {
diff --git a/chrome/browser/ui/gtk/import_dialog_gtk.h b/chrome/browser/ui/gtk/import_dialog_gtk.h
index 7d1cd03..c7cf8b4 100644
--- a/chrome/browser/ui/gtk/import_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/import_dialog_gtk.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_GTK_IMPORT_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "chrome/browser/importer/importer.h"
+#include "ui/base/gtk/gtk_signal.h"
class AccessibleWidgetHelper;
class Profile;
diff --git a/chrome/browser/ui/gtk/import_lock_dialog_gtk.h b/chrome/browser/ui/gtk/import_lock_dialog_gtk.h
index c82f4c3..b4760b6 100644
--- a/chrome/browser/ui/gtk/import_lock_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/import_lock_dialog_gtk.h
@@ -8,9 +8,9 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/ref_counted.h"
+#include "ui/base/gtk/gtk_signal.h"
class ImporterHost;
diff --git a/chrome/browser/ui/gtk/info_bubble_gtk.h b/chrome/browser/ui/gtk/info_bubble_gtk.h
index d26167a..8bc4aab 100644
--- a/chrome/browser/ui/gtk/info_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/info_bubble_gtk.h
@@ -17,13 +17,13 @@
#include <gtk/gtk.h>
#include <vector>
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/basictypes.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "gfx/point.h"
#include "gfx/rect.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
class GtkThemeProvider;
class InfoBubbleGtk;
@@ -207,7 +207,7 @@ class InfoBubbleGtk : public NotificationObserver {
NotificationRegistrar registrar_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
DISALLOW_COPY_AND_ASSIGN(InfoBubbleGtk);
};
diff --git a/chrome/browser/ui/gtk/infobar_gtk.h b/chrome/browser/ui/gtk/infobar_gtk.h
index 5e1c458..98c6d72 100644
--- a/chrome/browser/ui/gtk/infobar_gtk.h
+++ b/chrome/browser/ui/gtk/infobar_gtk.h
@@ -6,7 +6,6 @@
#define CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
@@ -16,6 +15,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "third_party/skia/include/core/SkPaint.h"
+#include "ui/base/gtk/gtk_signal.h"
class CustomDrawButton;
class GtkThemeProvider;
diff --git a/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.h b/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.h
index 9999421..8ef0653 100644
--- a/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_GTK_INSTANT_CONFIRM_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
typedef struct _GtkWindow GtkWindow;
diff --git a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
index cba5810..376e3ce 100644
--- a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
@@ -7,13 +7,13 @@
#include <gtk/gtk.h>
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "ui/base/message_box_flags.h"
namespace {
@@ -56,12 +56,12 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
// We add in the OK button manually later because we want to focus it
// explicitly.
switch (dialog_->dialog_flags()) {
- case MessageBoxFlags::kIsJavascriptAlert:
+ case ui::MessageBoxFlags::kIsJavascriptAlert:
buttons = GTK_BUTTONS_NONE;
message_type = GTK_MESSAGE_WARNING;
break;
- case MessageBoxFlags::kIsJavascriptConfirm:
+ case ui::MessageBoxFlags::kIsJavascriptConfirm:
if (dialog_->is_before_unload_dialog()) {
// onbeforeunload also uses a confirm prompt, it just has custom
// buttons. We add the buttons using gtk_dialog_add_button below.
@@ -72,7 +72,7 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
message_type = GTK_MESSAGE_QUESTION;
break;
- case MessageBoxFlags::kIsJavascriptPrompt:
+ case ui::MessageBoxFlags::kIsJavascriptPrompt:
buttons = GTK_BUTTONS_CANCEL;
message_type = GTK_MESSAGE_QUESTION;
break;
@@ -94,7 +94,7 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
// Adjust content area as needed. Set up the prompt text entry or
// suppression check box.
- if (MessageBoxFlags::kIsJavascriptPrompt == dialog_->dialog_flags()) {
+ if (ui::MessageBoxFlags::kIsJavascriptPrompt == dialog_->dialog_flags()) {
// TODO(tc): Replace with gtk_dialog_get_content_area() when using GTK 2.14+
GtkWidget* contents_vbox = GTK_DIALOG(gtk_dialog_)->vbox;
GtkWidget* text_box = gtk_entry_new();
@@ -129,7 +129,7 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
// Add the OK button and focus it.
GtkWidget* ok_button = gtk_dialog_add_button(GTK_DIALOG(gtk_dialog_),
GTK_STOCK_OK, GTK_RESPONSE_OK);
- if (MessageBoxFlags::kIsJavascriptPrompt != dialog_->dialog_flags())
+ if (ui::MessageBoxFlags::kIsJavascriptPrompt != dialog_->dialog_flags())
gtk_widget_grab_focus(ok_button);
}
@@ -146,15 +146,15 @@ JSModalDialogGtk::~JSModalDialogGtk() {
int JSModalDialogGtk::GetAppModalDialogButtons() const {
switch (dialog_->dialog_flags()) {
- case MessageBoxFlags::kIsJavascriptAlert:
- return MessageBoxFlags::DIALOGBUTTON_OK;
+ case ui::MessageBoxFlags::kIsJavascriptAlert:
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK;
- case MessageBoxFlags::kIsJavascriptConfirm:
- return MessageBoxFlags::DIALOGBUTTON_OK |
- MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ case ui::MessageBoxFlags::kIsJavascriptConfirm:
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK |
+ ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
- case MessageBoxFlags::kIsJavascriptPrompt:
- return MessageBoxFlags::DIALOGBUTTON_OK;
+ case ui::MessageBoxFlags::kIsJavascriptPrompt:
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK;
default:
NOTREACHED();
diff --git a/chrome/browser/ui/gtk/js_modal_dialog_gtk.h b/chrome/browser/ui/gtk/js_modal_dialog_gtk.h
index e40c38b..7952309 100644
--- a/chrome/browser/ui/gtk/js_modal_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/js_modal_dialog_gtk.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_GTK_JS_MODAL_DIALOG_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
#include "gfx/native_widget_types.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
index 6d3fbc5..0298495 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -11,7 +11,6 @@
#include <map>
#include <string>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/scoped_vector.h"
@@ -29,6 +28,7 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/common/page_transition_types.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/gtk/gtk_signal.h"
#include "webkit/glue/window_open_disposition.h"
class AutocompleteEditViewGtk;
diff --git a/chrome/browser/ui/gtk/menu_bar_helper.cc b/chrome/browser/ui/gtk/menu_bar_helper.cc
index 11803b9..7a792f83 100644
--- a/chrome/browser/ui/gtk/menu_bar_helper.cc
+++ b/chrome/browser/ui/gtk/menu_bar_helper.cc
@@ -6,9 +6,9 @@
#include <algorithm>
-#include "app/gtk_signal_registrar.h"
#include "base/logging.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
namespace {
@@ -81,7 +81,7 @@ void MenuBarHelper::MenuStartedShowing(GtkWidget* button, GtkWidget* menu) {
button_showing_menu_ = button;
showing_menu_ = menu;
- signal_handlers_.reset(new GtkSignalRegistrar());
+ signal_handlers_.reset(new ui::GtkSignalRegistrar());
signal_handlers_->Connect(menu, "destroy",
G_CALLBACK(OnMenuHiddenOrDestroyedThunk), this);
signal_handlers_->Connect(menu, "hide",
diff --git a/chrome/browser/ui/gtk/menu_bar_helper.h b/chrome/browser/ui/gtk/menu_bar_helper.h
index e29a18e..57077e9 100644
--- a/chrome/browser/ui/gtk/menu_bar_helper.h
+++ b/chrome/browser/ui/gtk/menu_bar_helper.h
@@ -13,10 +13,12 @@
#include <vector>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
+#include "ui/base/gtk/gtk_signal.h"
+namespace ui {
class GtkSignalRegistrar;
+}
class MenuBarHelper {
public:
@@ -70,7 +72,7 @@ class MenuBarHelper {
// Signal handlers that are attached only between the "show" and "hide" events
// for the menu.
- scoped_ptr<GtkSignalRegistrar> signal_handlers_;
+ scoped_ptr<ui::GtkSignalRegistrar> signal_handlers_;
Delegate* delegate_;
};
diff --git a/chrome/browser/ui/gtk/menu_gtk.h b/chrome/browser/ui/gtk/menu_gtk.h
index abe78a6..2fdb2eb 100644
--- a/chrome/browser/ui/gtk/menu_gtk.h
+++ b/chrome/browser/ui/gtk/menu_gtk.h
@@ -11,9 +11,9 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "base/task.h"
#include "gfx/point.h"
+#include "ui/base/gtk/gtk_signal.h"
class SkBitmap;
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
index c215ad6..260c9e7 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
@@ -8,7 +8,6 @@
#define CHROME_BROWSER_UI_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/notifications/balloon.h"
@@ -20,6 +19,7 @@
#include "gfx/rect.h"
#include "gfx/size.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/gtk/gtk_signal.h"
class BalloonCollection;
class CustomDrawButton;
diff --git a/chrome/browser/ui/gtk/options/advanced_contents_gtk.cc b/chrome/browser/ui/gtk/options/advanced_contents_gtk.cc
index a410fd2..e8ad344 100644
--- a/chrome/browser/ui/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/ui/gtk/options/advanced_contents_gtk.cc
@@ -10,7 +10,6 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/basictypes.h"
#include "base/command_line.h"
@@ -47,6 +46,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace {
diff --git a/chrome/browser/ui/gtk/options/advanced_page_gtk.h b/chrome/browser/ui/gtk/options/advanced_page_gtk.h
index 3477ff4..39277ef 100644
--- a/chrome/browser/ui/gtk/options/advanced_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/advanced_page_gtk.h
@@ -8,11 +8,11 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/gtk/options/advanced_contents_gtk.h"
#include "chrome/browser/ui/gtk/options/managed_prefs_banner_gtk.h"
#include "chrome/browser/ui/options/options_page_base.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
diff --git a/chrome/browser/ui/gtk/options/content_exception_editor.h b/chrome/browser/ui/gtk/options/content_exception_editor.h
index 833ebf8..6839838 100644
--- a/chrome/browser/ui/gtk/options/content_exception_editor.h
+++ b/chrome/browser/ui/gtk/options/content_exception_editor.h
@@ -8,11 +8,11 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "chrome/browser/content_exceptions_table_model.h"
#include "chrome/browser/content_setting_combo_model.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
+#include "ui/base/gtk/gtk_signal.h"
// An editor which lets the user create or edit an individual exception to the
// current content setting policy. (i.e. let www.google.com always show
diff --git a/chrome/browser/ui/gtk/options/content_exceptions_window_gtk.h b/chrome/browser/ui/gtk/options/content_exceptions_window_gtk.h
index 335bb69..2f1940e 100644
--- a/chrome/browser/ui/gtk/options/content_exceptions_window_gtk.h
+++ b/chrome/browser/ui/gtk/options/content_exceptions_window_gtk.h
@@ -10,13 +10,13 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/content_exceptions_table_model.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "chrome/browser/ui/gtk/options/content_exception_editor.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
+#include "ui/base/gtk/gtk_signal.h"
class HostContentSettingsMap;
diff --git a/chrome/browser/ui/gtk/options/content_filter_page_gtk.h b/chrome/browser/ui/gtk/options/content_filter_page_gtk.h
index 82daa24..39d4179 100644
--- a/chrome/browser/ui/gtk/options/content_filter_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/content_filter_page_gtk.h
@@ -8,12 +8,12 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/ui/options/options_page_base.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class ContentSettingsDetails;
diff --git a/chrome/browser/ui/gtk/options/content_page_gtk.h b/chrome/browser/ui/gtk/options/content_page_gtk.h
index 183b7b0..313e402 100644
--- a/chrome/browser/ui/gtk/options/content_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/content_page_gtk.h
@@ -10,12 +10,12 @@
#include <string>
-#include "app/gtk_signal.h"
#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/ui/gtk/options/managed_prefs_banner_gtk.h"
#include "chrome/browser/ui/options/options_page_base.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
diff --git a/chrome/browser/ui/gtk/options/content_settings_window_gtk.h b/chrome/browser/ui/gtk/options/content_settings_window_gtk.h
index cd50a9f..7a5b248 100644
--- a/chrome/browser/ui/gtk/options/content_settings_window_gtk.h
+++ b/chrome/browser/ui/gtk/options/content_settings_window_gtk.h
@@ -8,12 +8,12 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/gtk/options/content_filter_page_gtk.h"
#include "chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h"
#include "chrome/common/content_settings_types.h"
+#include "ui/base/gtk/gtk_signal.h"
class AccessibleWidgetHelper;
diff --git a/chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h b/chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h
index dbd361d..82c0128 100644
--- a/chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h
@@ -10,10 +10,10 @@
#include <string>
-#include "app/gtk_signal.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/options/options_page_base.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
diff --git a/chrome/browser/ui/gtk/options/cookies_view.h b/chrome/browser/ui/gtk/options/cookies_view.h
index eac8d95..26d72f6 100644
--- a/chrome/browser/ui/gtk/options/cookies_view.h
+++ b/chrome/browser/ui/gtk/options/cookies_view.h
@@ -10,7 +10,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
@@ -22,6 +21,7 @@
#include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "net/base/cookie_monster.h"
+#include "ui/base/gtk/gtk_signal.h"
class CookieDisplayGtk;
class CookiesTreeModel;
diff --git a/chrome/browser/ui/gtk/options/fonts_page_gtk.h b/chrome/browser/ui/gtk/options/fonts_page_gtk.h
index 020a7b3..e61d225 100644
--- a/chrome/browser/ui/gtk/options/fonts_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/fonts_page_gtk.h
@@ -11,11 +11,11 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/options/options_page_base.h"
+#include "ui/base/gtk/gtk_signal.h"
class DefaultEncodingComboboxModel;
diff --git a/chrome/browser/ui/gtk/options/general_page_gtk.h b/chrome/browser/ui/gtk/options/general_page_gtk.h
index 059194a..9e41e50 100644
--- a/chrome/browser/ui/gtk/options/general_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/general_page_gtk.h
@@ -10,7 +10,6 @@
#include <string>
-#include "app/gtk_signal.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/search_engines/template_url_model_observer.h"
@@ -19,6 +18,7 @@
#include "chrome/browser/ui/gtk/options/managed_prefs_banner_gtk.h"
#include "chrome/browser/ui/options/options_page_base.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/gtk/gtk_signal.h"
class AccessibleWidgetHelper;
class CustomHomePagesTableModel;
diff --git a/chrome/browser/ui/gtk/options/languages_page_gtk.cc b/chrome/browser/ui/gtk/options/languages_page_gtk.cc
index 9374bc1..a2230d4 100644
--- a/chrome/browser/ui/gtk/options/languages_page_gtk.cc
+++ b/chrome/browser/ui/gtk/options/languages_page_gtk.cc
@@ -8,7 +8,6 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/command_line.h"
#include "base/message_loop.h"
@@ -22,6 +21,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/spellcheck_common.h"
#include "grit/generated_resources.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace {
diff --git a/chrome/browser/ui/gtk/options/languages_page_gtk.h b/chrome/browser/ui/gtk/options/languages_page_gtk.h
index 3aace64..e3eaa27 100644
--- a/chrome/browser/ui/gtk/options/languages_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/languages_page_gtk.h
@@ -17,12 +17,12 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "chrome/browser/ui/options/options_page_base.h"
+#include "ui/base/gtk/gtk_signal.h"
class LanguageComboboxModel;
class LanguageOrderTableModel;
diff --git a/chrome/browser/ui/gtk/options/passwords_exceptions_page_gtk.h b/chrome/browser/ui/gtk/options/passwords_exceptions_page_gtk.h
index 7ffa5a4..8c0f145 100644
--- a/chrome/browser/ui/gtk/options/passwords_exceptions_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/passwords_exceptions_page_gtk.h
@@ -10,8 +10,8 @@
#include <vector>
-#include "app/gtk_signal.h"
#include "chrome/browser/password_manager/password_store.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
diff --git a/chrome/browser/ui/gtk/options/passwords_page_gtk.h b/chrome/browser/ui/gtk/options/passwords_page_gtk.h
index e4d0140..618f1ad 100644
--- a/chrome/browser/ui/gtk/options/passwords_page_gtk.h
+++ b/chrome/browser/ui/gtk/options/passwords_page_gtk.h
@@ -11,10 +11,10 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/common/notification_observer.h"
+#include "ui/base/gtk/gtk_signal.h"
class Profile;
diff --git a/chrome/browser/ui/gtk/options/simple_content_exceptions_window.h b/chrome/browser/ui/gtk/options/simple_content_exceptions_window.h
index 30a7c83..c817c01 100644
--- a/chrome/browser/ui/gtk/options/simple_content_exceptions_window.h
+++ b/chrome/browser/ui/gtk/options/simple_content_exceptions_window.h
@@ -8,12 +8,12 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/remove_rows_table_model.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
+#include "ui/base/gtk/gtk_signal.h"
class SimpleContentExceptionsWindow
: public gtk_tree::TableAdapter::Delegate {
diff --git a/chrome/browser/ui/gtk/options/url_picker_dialog_gtk.h b/chrome/browser/ui/gtk/options/url_picker_dialog_gtk.h
index a21242f..2129f4c 100644
--- a/chrome/browser/ui/gtk/options/url_picker_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/options/url_picker_dialog_gtk.h
@@ -8,11 +8,11 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/callback.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
+#include "ui/base/gtk/gtk_signal.h"
class AccessibleWidgetHelper;
class GURL;
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.h b/chrome/browser/ui/gtk/reload_button_gtk.h
index bdd5e53..442a739 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.h
+++ b/chrome/browser/ui/gtk/reload_button_gtk.h
@@ -8,13 +8,13 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/timer.h"
#include "chrome/browser/ui/gtk/custom_button.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class Browser;
class GtkThemeProvider;
diff --git a/chrome/browser/ui/gtk/repost_form_warning_gtk.h b/chrome/browser/ui/gtk/repost_form_warning_gtk.h
index 551164c..6fa7cef 100644
--- a/chrome/browser/ui/gtk/repost_form_warning_gtk.h
+++ b/chrome/browser/ui/gtk/repost_form_warning_gtk.h
@@ -8,9 +8,9 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
class RepostFormWarningController;
diff --git a/chrome/browser/ui/gtk/rounded_window.cc b/chrome/browser/ui/gtk/rounded_window.cc
index 42742ff..3f8b6e4 100644
--- a/chrome/browser/ui/gtk/rounded_window.cc
+++ b/chrome/browser/ui/gtk/rounded_window.cc
@@ -7,10 +7,10 @@
#include <gtk/gtk.h>
#include <math.h>
-#include "app/gtk_signal_registrar.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
namespace gtk_util {
@@ -40,7 +40,7 @@ struct RoundedWindowData {
int drawn_borders;
// Keeps track of attached signal handlers.
- GtkSignalRegistrar signals;
+ ui::GtkSignalRegistrar signals;
};
// Callback from GTK to release allocated memory.
diff --git a/chrome/browser/ui/gtk/sad_tab_gtk.h b/chrome/browser/ui/gtk/sad_tab_gtk.h
index cd756fd..03ab37f 100644
--- a/chrome/browser/ui/gtk/sad_tab_gtk.h
+++ b/chrome/browser/ui/gtk/sad_tab_gtk.h
@@ -8,8 +8,8 @@
typedef struct _GtkWidget GtkWidget;
-#include "app/gtk_signal.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
class TabContents;
diff --git a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
index fc8144e..afae5e3 100644
--- a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
+++ b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
@@ -9,7 +9,6 @@
#include <string>
#include <vector>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/i18n/time_formatting.h"
#include "base/logging.h"
@@ -26,6 +25,7 @@
#include "gfx/native_widget_types.h"
#include "grit/generated_resources.h"
#include "net/base/x509_certificate.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace {
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index ecbdebc..79e6073 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -8,7 +8,6 @@
#include <algorithm>
-#include "app/text_elider.h"
#include "base/i18n/rtl.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
@@ -18,6 +17,7 @@
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
#include "chrome/common/notification_service.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/text/text_elider.h"
namespace {
@@ -105,8 +105,8 @@ void StatusBubbleGtk::SetStatusTextToURL() {
}
// TODO(tc): We don't actually use gfx::Font as the font in the status
- // bubble. We should extend gfx::ElideUrl to take some sort of pango font.
- url_text_ = UTF16ToUTF8(gfx::ElideUrl(url_, gfx::Font(), desired_width,
+ // bubble. We should extend ui::ElideUrl to take some sort of pango font.
+ url_text_ = UTF16ToUTF8(ui::ElideUrl(url_, gfx::Font(), desired_width,
UTF16ToWideHack(languages_)));
SetStatusTextTo(url_text_);
}
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.h b/chrome/browser/ui/gtk/status_bubble_gtk.h
index 743213d..1e6c0b6 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.h
@@ -10,7 +10,6 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
@@ -20,6 +19,7 @@
#include "gfx/point.h"
#include "googleurl/src/gurl.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/gtk/gtk_signal.h"
class GtkThemeProvider;
class Profile;
diff --git a/chrome/browser/ui/gtk/status_icons/status_icon_gtk.h b/chrome/browser/ui/gtk/status_icons/status_icon_gtk.h
index 686fb6e..3acf454 100644
--- a/chrome/browser/ui/gtk/status_icons/status_icon_gtk.h
+++ b/chrome/browser/ui/gtk/status_icons/status_icon_gtk.h
@@ -8,8 +8,8 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "chrome/browser/status_icons/status_icon.h"
+#include "ui/base/gtk/gtk_signal.h"
class MenuGtk;
class SkBitmap;
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.h b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
index 24eaa99..49f57bb 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.h
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
@@ -8,12 +8,12 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class RenderViewHost;
class StatusBubbleGtk;
diff --git a/chrome/browser/ui/gtk/tab_contents_drag_source.h b/chrome/browser/ui/gtk/tab_contents_drag_source.h
index e2550f7..52b66f7 100644
--- a/chrome/browser/ui/gtk/tab_contents_drag_source.h
+++ b/chrome/browser/ui/gtk/tab_contents_drag_source.h
@@ -8,8 +8,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
-#include "app/gtk_signal_registrar.h"
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/message_loop.h"
@@ -18,6 +16,8 @@
#include "gfx/native_widget_types.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
+#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/gtk/gtk_signal_registrar.h"
class SkBitmap;
class TabContents;
@@ -102,7 +102,7 @@ class TabContentsDragSource : public MessageLoopForUI::Observer {
// the reference.
GtkWidget* drag_icon_;
- GtkSignalRegistrar signals_;
+ ui::GtkSignalRegistrar signals_;
DISALLOW_COPY_AND_ASSIGN(TabContentsDragSource);
};
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
index 87cc31f..cf31d4c 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
@@ -10,13 +10,13 @@
#include <set>
-#include "app/x11_util.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/ui/tabs/dock_info.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/x/x11_util.h"
class DraggedTabGtk;
class TabGtk;
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_gtk.cc
index 19c2b6f..07ed920 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_gtk.cc
@@ -8,7 +8,6 @@
#include <algorithm>
-#include "app/x11_util.h"
#include "base/i18n/rtl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/backing_store_x.h"
@@ -20,6 +19,7 @@
#include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
#include "gfx/gtk_util.h"
#include "third_party/skia/include/core/SkShader.h"
+#include "ui/base/x/x11_util.h"
namespace {
diff --git a/chrome/browser/ui/gtk/tabs/tab_gtk.h b/chrome/browser/ui/gtk/tabs/tab_gtk.h
index 63841f5..b80039c 100644
--- a/chrome/browser/ui/gtk/tabs/tab_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_gtk.h
@@ -6,17 +6,19 @@
#define CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_
#pragma once
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace gfx {
class Path;
}
+namespace ui {
class ThemeProvider;
+}
class TabGtk : public TabRendererGtk,
public MessageLoopForUI::Observer {
@@ -76,7 +78,7 @@ class TabGtk : public TabRendererGtk,
virtual bool HasAvailableDragActions() const = 0;
// Returns the theme provider for icons and colors.
- virtual ThemeProvider* GetThemeProvider() = 0;
+ virtual ui::ThemeProvider* GetThemeProvider() = 0;
protected:
virtual ~TabDelegate() {}
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index dc23b31..87d6bab 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -89,7 +89,8 @@ gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent,
} // namespace
-TabRendererGtk::LoadingAnimation::Data::Data(ThemeProvider* theme_provider) {
+TabRendererGtk::LoadingAnimation::Data::Data(
+ ui::ThemeProvider* theme_provider) {
// The loading animation image is a strip of states. Each state must be
// square, so the height must divide the width evenly.
loading_animation_frames = theme_provider->GetBitmapNamed(IDR_THROBBER);
@@ -144,7 +145,7 @@ SkColor TabRendererGtk::unselected_title_color_ = SkColorSetRGB(64, 64, 64);
// TabRendererGtk::LoadingAnimation, public:
//
TabRendererGtk::LoadingAnimation::LoadingAnimation(
- ThemeProvider* theme_provider)
+ ui::ThemeProvider* theme_provider)
: data_(new Data(theme_provider)),
theme_provider_(theme_provider),
animation_state_(ANIMATION_NONE),
@@ -243,7 +244,7 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation,
////////////////////////////////////////////////////////////////////////////////
// TabRendererGtk, public:
-TabRendererGtk::TabRendererGtk(ThemeProvider* theme_provider)
+TabRendererGtk::TabRendererGtk(ui::ThemeProvider* theme_provider)
: showing_icon_(false),
showing_close_button_(false),
fav_icon_hiding_offset_(0),
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
index 7d0b6d1..06e5510 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
@@ -9,7 +9,6 @@
#include <gtk/gtk.h>
#include <map>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
@@ -21,6 +20,7 @@
#include "gfx/rect.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/gtk/gtk_signal.h"
namespace gfx {
class Size;
@@ -29,10 +29,10 @@ class Size;
class CustomDrawButton;
class GtkThemeProvider;
class TabContents;
-class ThemeProvider;
namespace ui {
class SlideAnimation;
+class ThemeProvider;
class ThrobAnimation;
}
@@ -49,7 +49,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
class LoadingAnimation : public NotificationObserver {
public:
struct Data {
- explicit Data(ThemeProvider* theme_provider);
+ explicit Data(ui::ThemeProvider* theme_provider);
Data(int loading, int waiting, int waiting_to_loading);
SkBitmap* waiting_animation_frames;
@@ -59,7 +59,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
int waiting_to_loading_frame_count_ratio;
};
- explicit LoadingAnimation(ThemeProvider* theme_provider);
+ explicit LoadingAnimation(ui::ThemeProvider* theme_provider);
// Used in unit tests to inject specific data.
explicit LoadingAnimation(const LoadingAnimation::Data& data);
@@ -93,7 +93,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
NotificationRegistrar registrar_;
// Gives us our throbber images.
- ThemeProvider* theme_provider_;
+ ui::ThemeProvider* theme_provider_;
// Current state of the animation.
AnimationState animation_state_;
@@ -104,7 +104,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
DISALLOW_COPY_AND_ASSIGN(LoadingAnimation);
};
- explicit TabRendererGtk(ThemeProvider* theme_provider);
+ explicit TabRendererGtk(ui::ThemeProvider* theme_provider);
virtual ~TabRendererGtk();
// TabContents. If only the loading state was updated, the loading_only flag
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 00e2f2c..42c9f92 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -1206,7 +1206,7 @@ bool TabStripGtk::HasAvailableDragActions() const {
return model_->delegate()->GetDragActions() != 0;
}
-ThemeProvider* TabStripGtk::GetThemeProvider() {
+ui::ThemeProvider* TabStripGtk::GetThemeProvider() {
return theme_provider_;
}
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
index af42202..0056e9e 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
@@ -9,7 +9,6 @@
#include <gtk/gtk.h>
#include <vector>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "base/task.h"
#include "base/message_loop.h"
@@ -20,6 +19,7 @@
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/common/notification_observer.h"
#include "gfx/rect.h"
+#include "ui/base/gtk/gtk_signal.h"
class BrowserWindowGtk;
class CustomDrawButton;
@@ -142,7 +142,7 @@ class TabStripGtk : public TabStripModelObserver,
virtual void ContinueDrag(GdkDragContext* context);
virtual bool EndDrag(bool canceled);
virtual bool HasAvailableDragActions() const;
- virtual ThemeProvider* GetThemeProvider();
+ virtual ui::ThemeProvider* GetThemeProvider();
// MessageLoop::Observer implementation:
virtual void WillProcessEvent(GdkEvent* event);
diff --git a/chrome/browser/ui/gtk/task_manager_gtk.h b/chrome/browser/ui/gtk/task_manager_gtk.h
index 2f90ddf..e72d29a 100644
--- a/chrome/browser/ui/gtk/task_manager_gtk.h
+++ b/chrome/browser/ui/gtk/task_manager_gtk.h
@@ -10,10 +10,10 @@
#include <string>
-#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "grit/generated_resources.h"
+#include "ui/base/gtk/gtk_signal.h"
#if defined(TOOLKIT_VIEWS)
namespace gfx {
diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
index 9a963ef..7bed460 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
@@ -8,10 +8,10 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/gtk/gtk_signal.h"
class ThemeInstallBubbleViewGtk : public NotificationObserver {
public:
diff --git a/chrome/browser/ui/gtk/update_recommended_dialog.h b/chrome/browser/ui/gtk/update_recommended_dialog.h
index ccce4e3..e52a505 100644
--- a/chrome/browser/ui/gtk/update_recommended_dialog.h
+++ b/chrome/browser/ui/gtk/update_recommended_dialog.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_GTK_UPDATE_RECOMMENDED_DIALOG_H_
#pragma once
-#include "app/gtk_integers.h"
-#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "ui/base/gtk/gtk_integers.h"
+#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
diff --git a/chrome/browser/ui/input_window_dialog_gtk.cc b/chrome/browser/ui/input_window_dialog_gtk.cc
index 8f78cb5..4b2c3f7 100644
--- a/chrome/browser/ui/input_window_dialog_gtk.cc
+++ b/chrome/browser/ui/input_window_dialog_gtk.cc
@@ -6,12 +6,12 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "base/string_piece.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
+#include "ui/base/gtk/gtk_signal.h"
class InputWindowDialogGtk : public InputWindowDialog {
public:
diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc
index fe0e0a5..5516316 100644
--- a/chrome/browser/ui/login/login_prompt_gtk.cc
+++ b/chrome/browser/ui/login/login_prompt_gtk.cc
@@ -6,7 +6,6 @@
#include <gtk/gtk.h>
-#include "app/gtk_signal.h"
#include "app/l10n_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_thread.h"
@@ -22,6 +21,7 @@
#include "chrome/browser/ui/login/login_model.h"
#include "grit/generated_resources.h"
#include "net/url_request/url_request.h"
+#include "ui/base/gtk/gtk_signal.h"
using webkit_glue::PasswordForm;
diff --git a/chrome/browser/ui/tabs/dock_info_gtk.cc b/chrome/browser/ui/tabs/dock_info_gtk.cc
index abe02e7..402e79d 100644
--- a/chrome/browser/ui/tabs/dock_info_gtk.cc
+++ b/chrome/browser/ui/tabs/dock_info_gtk.cc
@@ -13,18 +13,19 @@
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "gfx/native_widget_types.h"
+#include "ui/base/x/x11_util.h"
////////////////////////////////////////////////////////////////////////////////
// BaseWindowFinder
//
// Base class used to locate a window. A subclass need only override
// ShouldStopIterating to determine when iteration should stop.
-class BaseWindowFinder : public x11_util::EnumerateWindowsDelegate {
+class BaseWindowFinder : public ui::EnumerateWindowsDelegate {
public:
explicit BaseWindowFinder(const std::set<GtkWidget*>& ignore) {
std::set<GtkWidget*>::iterator iter;
for (iter = ignore.begin(); iter != ignore.end(); iter++) {
- XID xid = x11_util::GetX11WindowFromGtkWidget(*iter);
+ XID xid = ui::GetX11WindowFromGtkWidget(*iter);
ignore_.insert(xid);
}
}
@@ -75,13 +76,13 @@ class TopMostFinder : public BaseWindowFinder {
return true;
}
- if (!x11_util::IsWindowVisible(window)) {
+ if (!ui::IsWindowVisible(window)) {
// The window isn't visible, keep iterating.
return false;
}
gfx::Rect rect;
- if (x11_util::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) {
+ if (ui::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) {
// At this point we haven't found our target window, so this window is
// higher in the z-order than the target window. If this window contains
// the point, then we can stop the search now because this window is
@@ -145,11 +146,11 @@ class LocalProcessWindowFinder : public BaseWindowFinder {
if (!BrowserWindowGtk::GetBrowserWindowForXID(window))
return false;
- if (!x11_util::IsWindowVisible(window))
+ if (!ui::IsWindowVisible(window))
return false;
gfx::Rect rect;
- if (x11_util::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) {
+ if (ui::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) {
result_ = window;
return true;
}
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 5ef55c165..3ceee8d 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -7,7 +7,6 @@
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
#include "app/l10n_util.h"
-#include "app/text_elider.h"
#include "app/resource_bundle.h"
#include "base/string_number_conversions.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -22,6 +21,7 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/registry_controlled_domain.h"
+#include "ui/base/text/text_elider.h"
const int BackForwardMenuModel::kMaxHistoryItems = 12;
const int BackForwardMenuModel::kMaxChapterStops = 5;
@@ -82,7 +82,7 @@ string16 BackForwardMenuModel::GetLabelAt(int index) const {
string16 menu_text(entry->GetTitleForDisplay(
GetTabContents()->profile()->GetPrefs()->
GetString(prefs::kAcceptLanguages)));
- menu_text = gfx::ElideText(menu_text, gfx::Font(), kMaxWidth, false);
+ menu_text = ui::ElideText(menu_text, gfx::Font(), kMaxWidth, false);
for (size_t i = menu_text.find('&'); i != string16::npos;
i = menu_text.find('&', i + 2)) {
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index bb4b189..51d589a 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -6,8 +6,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
-#include "app/theme_provider.h"
#include "base/compiler_specific.h"
#include "base/i18n/bidi_line_iterator.h"
#include "base/i18n/rtl.h"
@@ -28,6 +26,8 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkShader.h"
+#include "ui/base/text/text_elider.h"
+#include "ui/base/theme_provider.h"
#include "unicode/ubidi.h"
#include "views/controls/button/text_button.h"
#include "views/controls/label.h"
@@ -710,8 +710,8 @@ void AutocompleteResultView::Elide(Runs* runs, int remaining_width) const {
// Can we fit at least an ellipsis?
std::wstring elided_text(UTF16ToWideHack(
- gfx::ElideText(WideToUTF16Hack(j->text), *j->font, remaining_width,
- false)));
+ ui::ElideText(WideToUTF16Hack(j->text), *j->font, remaining_width,
+ false)));
Classifications::reverse_iterator prior_classification(j);
++prior_classification;
const bool on_first_classification =
diff --git a/chrome/browser/ui/views/bookmark_bar_instructions_view.cc b/chrome/browser/ui/views/bookmark_bar_instructions_view.cc
index 53945a9..83b783a 100644
--- a/chrome/browser/ui/views/bookmark_bar_instructions_view.cc
+++ b/chrome/browser/ui/views/bookmark_bar_instructions_view.cc
@@ -97,7 +97,7 @@ void BookmarkBarInstructionsView::LinkActivated(views::Link* source,
void BookmarkBarInstructionsView::UpdateColors() {
// We don't always have a theme provider (ui tests, for example).
- const ThemeProvider* theme_provider = GetThemeProvider();
+ const ui::ThemeProvider* theme_provider = GetThemeProvider();
if (!theme_provider)
return;
updated_colors_ = true;
diff --git a/chrome/browser/ui/views/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmark_bar_view.cc
index 21ffe74..ede1b44 100644
--- a/chrome/browser/ui/views/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmark_bar_view.cc
@@ -11,7 +11,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -43,6 +42,7 @@
#include "grit/theme_resources.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/base/text/text_elider.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/label.h"
#include "views/controls/menu/menu_item_view.h"
@@ -144,7 +144,7 @@ static std::wstring CreateToolTipForURLAndTitle(const gfx::Point& screen_loc,
if (!title.empty()) {
std::wstring localized_title = title;
base::i18n::AdjustStringForLocaleDirection(&localized_title);
- result.append(UTF16ToWideHack(gfx::ElideText(WideToUTF16Hack(
+ result.append(UTF16ToWideHack(ui::ElideText(WideToUTF16Hack(
localized_title), tt_font, max_width, false)));
}
@@ -159,7 +159,7 @@ static std::wstring CreateToolTipForURLAndTitle(const gfx::Point& screen_loc,
// "/http://www.yahoo.com" when rendered, as is, in an RTL context since
// the Unicode BiDi algorithm puts certain characters on the left by
// default.
- string16 elided_url(gfx::ElideUrl(url, tt_font, max_width, languages));
+ string16 elided_url(ui::ElideUrl(url, tt_font, max_width, languages));
elided_url = base::i18n::GetDisplayStringInLTRDirectionality(elided_url);
result.append(UTF16ToWideHack(elided_url));
}
@@ -1577,7 +1577,7 @@ void BookmarkBarView::StopThrobbing(bool immediate) {
void BookmarkBarView::UpdateColors() {
// We don't always have a theme provider (ui tests, for example).
- const ThemeProvider* theme_provider = GetThemeProvider();
+ const ui::ThemeProvider* theme_provider = GetThemeProvider();
if (!theme_provider)
return;
SkColor text_color =
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 7e3726d..817dc7c 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -986,7 +986,7 @@ void BrowserActionsContainer::ModelLoaded() {
}
void BrowserActionsContainer::LoadImages() {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
chevron_->SetIcon(*tp->GetBitmapNamed(IDR_BROWSER_ACTIONS_OVERFLOW));
chevron_->SetHoverIcon(*tp->GetBitmapNamed(IDR_BROWSER_ACTIONS_OVERFLOW_H));
chevron_->SetPushedIcon(*tp->GetBitmapNamed(IDR_BROWSER_ACTIONS_OVERFLOW_P));
diff --git a/chrome/browser/ui/views/confirm_message_box_dialog.cc b/chrome/browser/ui/views/confirm_message_box_dialog.cc
index 5d5b4e8..2c076c2 100644
--- a/chrome/browser/ui/views/confirm_message_box_dialog.cc
+++ b/chrome/browser/ui/views/confirm_message_box_dialog.cc
@@ -5,10 +5,10 @@
#include "chrome/browser/ui/views/confirm_message_box_dialog.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "ui/base/message_box_flags.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
#include "views/window/window.h"
@@ -65,8 +65,8 @@ ConfirmMessageBoxDialog::ConfirmMessageBoxDialog(
}
int ConfirmMessageBoxDialog::GetDialogButtons() const {
- return MessageBoxFlags::DIALOGBUTTON_OK |
- MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK |
+ ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
}
std::wstring ConfirmMessageBoxDialog::GetWindowTitle() const {
@@ -74,11 +74,11 @@ std::wstring ConfirmMessageBoxDialog::GetWindowTitle() const {
}
std::wstring ConfirmMessageBoxDialog::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
+ ui::MessageBoxFlags::DialogButton button) const {
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) {
return confirm_label_;
}
- if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL)
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL)
return reject_label_;
return DialogDelegate::GetDialogButtonLabel(button);
}
diff --git a/chrome/browser/ui/views/default_search_view.cc b/chrome/browser/ui/views/default_search_view.cc
index bf48c06..edea15e 100644
--- a/chrome/browser/ui/views/default_search_view.cc
+++ b/chrome/browser/ui/views/default_search_view.cc
@@ -7,7 +7,6 @@
#include <string>
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "app/resource_bundle.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -19,6 +18,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/button/native_button.h"
#include "views/controls/image_view.h"
#include "views/controls/label.h"
@@ -156,7 +156,7 @@ views::View* DefaultSearchView::GetContentsView() {
}
int DefaultSearchView::GetDialogButtons() const {
- return MessageBoxFlags::DIALOGBUTTON_NONE;
+ return ui::MessageBoxFlags::DIALOGBUTTON_NONE;
}
bool DefaultSearchView::Accept() {
diff --git a/chrome/browser/ui/views/detachable_toolbar_view.cc b/chrome/browser/ui/views/detachable_toolbar_view.cc
index 7f04409..09be69b 100644
--- a/chrome/browser/ui/views/detachable_toolbar_view.cc
+++ b/chrome/browser/ui/views/detachable_toolbar_view.cc
@@ -26,7 +26,7 @@ void DetachableToolbarView::PaintBackgroundAttachedMode(
gfx::Canvas* canvas,
views::View* view,
const gfx::Point& background_origin) {
- ThemeProvider* tp = view->GetThemeProvider();
+ ui::ThemeProvider* tp = view->GetThemeProvider();
SkColor theme_toolbar_color =
tp->GetColor(BrowserThemeProvider::COLOR_TOOLBAR);
canvas->FillRectInt(theme_toolbar_color, 0, 0,
@@ -63,7 +63,7 @@ void DetachableToolbarView::PaintHorizontalBorder(gfx::Canvas* canvas,
// static
void DetachableToolbarView::PaintContentAreaBackground(
- gfx::Canvas* canvas, ThemeProvider* theme_provider,
+ gfx::Canvas* canvas, ui::ThemeProvider* theme_provider,
const SkRect& rect, double roundness) {
SkPaint paint;
paint.setAntiAlias(true);
@@ -75,7 +75,7 @@ void DetachableToolbarView::PaintContentAreaBackground(
// static
void DetachableToolbarView::PaintContentAreaBorder(
- gfx::Canvas* canvas, ThemeProvider* theme_provider,
+ gfx::Canvas* canvas, ui::ThemeProvider* theme_provider,
const SkRect& rect, double roundness) {
SkPaint border_paint;
border_paint.setColor(
diff --git a/chrome/browser/ui/views/detachable_toolbar_view.h b/chrome/browser/ui/views/detachable_toolbar_view.h
index 64547b6..9f69bf1 100644
--- a/chrome/browser/ui/views/detachable_toolbar_view.h
+++ b/chrome/browser/ui/views/detachable_toolbar_view.h
@@ -60,12 +60,12 @@ class DetachableToolbarView : public AccessiblePaneView {
// bookmarks or extension toolstrips). |rect| is the rectangle to paint
// the background within. |roundness| describes the roundness of the corners.
static void PaintContentAreaBackground(gfx::Canvas* canvas,
- ThemeProvider* theme_provider,
+ ui::ThemeProvider* theme_provider,
const SkRect& rect,
double roundness);
// Paint the border around the content area (when in detached mode).
static void PaintContentAreaBorder(gfx::Canvas* canvas,
- ThemeProvider* theme_provider,
+ ui::ThemeProvider* theme_provider,
const SkRect& rect,
double roundness);
diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc
index f398941..155cc09 100644
--- a/chrome/browser/ui/views/download_item_view.cc
+++ b/chrome/browser/ui/views/download_item_view.cc
@@ -8,7 +8,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
#include "base/callback.h"
#include "base/file_path.h"
#include "base/i18n/rtl.h"
@@ -26,6 +25,7 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/text/text_elider.h"
#include "views/controls/button/native_button.h"
#include "views/controls/menu/menu_2.h"
#include "views/widget/root_view.h"
@@ -280,16 +280,16 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
// Elide giant extensions (this shouldn't currently be hit, but might
// in future, should we ever notice unsafe giant extensions).
if (extension.length() > kFileNameMaxLength / 2)
- gfx::ElideString(extension, kFileNameMaxLength / 2, &extension);
+ ui::ElideString(extension, kFileNameMaxLength / 2, &extension);
// The dangerous download label text is different for an extension file.
if (download->is_extension_install()) {
dangerous_download_label_ = new views::Label(UTF16ToWide(
l10n_util::GetStringUTF16(IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION)));
} else {
- gfx::ElideString(rootname,
- kFileNameMaxLength - extension.length(),
- &rootname);
+ ui::ElideString(rootname,
+ kFileNameMaxLength - extension.length(),
+ &rootname);
std::wstring filename = rootname + L"." + extension;
filename = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality(
WideToUTF16(filename)));
@@ -609,8 +609,8 @@ void DownloadItemView::Paint(gfx::Canvas* canvas) {
if (!IsDangerousMode()) {
string16 filename;
if (!disabled_while_opening_) {
- filename = gfx::ElideFilename(download_->GetFileNameToReportUser(),
- font_, kTextWidth);
+ filename = ui::ElideFilename(download_->GetFileNameToReportUser(),
+ font_, kTextWidth);
} else {
// First, Calculate the download status opening string width.
string16 status_string =
@@ -618,8 +618,8 @@ void DownloadItemView::Paint(gfx::Canvas* canvas) {
int status_string_width = font_.GetStringWidth(status_string);
// Then, elide the file name.
string16 filename_string =
- gfx::ElideFilename(download_->GetFileNameToReportUser(), font_,
- kTextWidth - status_string_width);
+ ui::ElideFilename(download_->GetFileNameToReportUser(), font_,
+ kTextWidth - status_string_width);
// Last, concat the whole string.
filename = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_OPENING,
filename_string);
diff --git a/chrome/browser/ui/views/dropdown_bar_host.cc b/chrome/browser/ui/views/dropdown_bar_host.cc
index 184cd9f..9770328 100644
--- a/chrome/browser/ui/views/dropdown_bar_host.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host.cc
@@ -20,7 +20,7 @@
#if defined(OS_WIN)
#include "base/win/scoped_gdi_object.h"
#elif defined(OS_LINUX)
-#include "app/scoped_handle_gtk.h"
+#include "ui/base/gtk/scoped_handle_gtk.h"
#endif
namespace {
@@ -28,7 +28,7 @@ namespace {
#if defined(OS_WIN)
typedef base::win::ScopedRegion ScopedPlatformRegion;
#elif defined(OS_LINUX)
-typedef ScopedRegion ScopedPlatformRegion;
+typedef ui::ScopedRegion ScopedPlatformRegion;
#endif
} // namespace
diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
index 61f0d38..c4d107a 100644
--- a/chrome/browser/ui/views/external_protocol_dialog.cc
+++ b/chrome/browser/ui/views/external_protocol_dialog.cc
@@ -5,8 +5,6 @@
#include "chrome/browser/ui/views/external_protocol_dialog.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
-#include "app/text_elider.h"
#include "base/metrics/histogram.h"
#include "base/string_util.h"
#include "base/threading/thread.h"
@@ -18,6 +16,8 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
+#include "ui/base/text/text_elider.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -56,12 +56,12 @@ ExternalProtocolDialog::~ExternalProtocolDialog() {
// ExternalProtocolDialog, views::DialogDelegate implementation:
int ExternalProtocolDialog::GetDefaultDialogButton() const {
- return MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
}
std::wstring ExternalProtocolDialog::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- if (button == MessageBoxFlags::DIALOGBUTTON_OK)
+ ui::MessageBoxFlags::DialogButton button) const {
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK)
return UTF16ToWide(
l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT));
else
@@ -125,9 +125,9 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
const int kMaxCommandSize = 256;
std::wstring elided_url_without_scheme;
std::wstring elided_command;
- gfx::ElideString(ASCIIToWide(url.possibly_invalid_spec()),
- kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
- gfx::ElideString(command, kMaxCommandSize, &elided_command);
+ ui::ElideString(ASCIIToWide(url.possibly_invalid_spec()),
+ kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
+ ui::ElideString(command, kMaxCommandSize, &elided_command);
std::wstring message_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_EXTERNAL_PROTOCOL_INFORMATION,
@@ -141,10 +141,11 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
message_text +=
UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_WARNING));
- message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox,
- message_text,
- std::wstring(),
- kMessageWidth);
+ message_box_view_ = new MessageBoxView(
+ ui::MessageBoxFlags::kIsConfirmMessageBox,
+ message_text,
+ std::wstring(),
+ kMessageWidth);
message_box_view_->SetCheckBoxLabel(UTF16ToWide(
l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT)));
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index db9af17d..e992f2a 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -286,7 +286,7 @@ void FindBarView::Paint(gfx::Canvas* canvas) {
// controller, so the whitespace in the left and right background images is
// actually outside the window region and is therefore not drawn. See
// FindInPageWidgetWin::CreateRoundedWindowEdges() for details.
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
canvas->TileImageInt(*tp->GetBitmapNamed(IDR_THEME_TOOLBAR), origin.x(),
origin.y(), 0, 0, bounds.width(), bounds.height());
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index 895e151..299a9a6 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/first_run_bubble.h"
-#include "app/gfx/font_util.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/utf_string_conversions.h"
@@ -18,6 +17,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
+#include "ui/base/l10n/l10n_font_util.h"
#include "ui/base/win/hwnd_util.h"
#include "views/event.h"
#include "views/controls/button/native_button.h"
@@ -346,9 +346,9 @@ gfx::Size FirstRunOEMBubbleView::GetPreferredSize() {
const gfx::Font& font = rb.GetFont(
ResourceBundle::MediumFont).DeriveFont(3, gfx::Font::BOLD);
gfx::Size size = gfx::Size(
- gfx::GetLocalizedContentsWidthForFont(
+ ui::GetLocalizedContentsWidthForFont(
IDS_FIRSTRUNOEMBUBBLE_DIALOG_WIDTH_CHARS, font),
- gfx::GetLocalizedContentsHeightForFont(
+ ui::GetLocalizedContentsHeightForFont(
IDS_FIRSTRUNOEMBUBBLE_DIALOG_HEIGHT_LINES, font));
// WARNING: HACK. Vista and XP calculate font size differently; this means
diff --git a/chrome/browser/ui/views/frame/browser_frame.h b/chrome/browser/ui/views/frame/browser_frame.h
index 3c6a98d..d45be30 100644
--- a/chrome/browser/ui/views/frame/browser_frame.h
+++ b/chrome/browser/ui/views/frame/browser_frame.h
@@ -12,13 +12,16 @@
class BaseTabStrip;
class BrowserView;
class Profile;
-class ThemeProvider;
namespace gfx {
class Font;
class Rect;
} // namespace gfx
+namespace ui {
+class ThemeProvider;
+}
+
namespace views {
class Window;
@@ -59,7 +62,7 @@ class BrowserFrame {
virtual void UpdateThrobber(bool running) = 0;
// Returns the theme provider for this frame.
- virtual ThemeProvider* GetThemeProviderForFrame() const = 0;
+ virtual ui::ThemeProvider* GetThemeProviderForFrame() const = 0;
// Returns true if the window should use the native frame view. This is true
// if there are no themes applied on Vista, or if there are themes applied and
diff --git a/chrome/browser/ui/views/frame/browser_frame_gtk.h b/chrome/browser/ui/views/frame/browser_frame_gtk.h
index 30539f5..b2dc1eb 100644
--- a/chrome/browser/ui/views/frame/browser_frame_gtk.h
+++ b/chrome/browser/ui/views/frame/browser_frame_gtk.h
@@ -33,14 +33,14 @@ class BrowserFrameGtk : public BrowserFrame,
virtual gfx::Rect GetBoundsForTabStrip(BaseTabStrip* tabstrip) const;
virtual int GetHorizontalTabStripVerticalOffset(bool restored) const;
virtual void UpdateThrobber(bool running);
- virtual ThemeProvider* GetThemeProviderForFrame() const;
+ virtual ui::ThemeProvider* GetThemeProviderForFrame() const;
virtual bool AlwaysUseNativeFrame() const;
virtual views::View* GetFrameView() const;
virtual void TabStripDisplayModeChanged();
// Overridden from views::Widget:
- virtual ThemeProvider* GetThemeProvider() const;
- virtual ThemeProvider* GetDefaultThemeProvider() const;
+ virtual ui::ThemeProvider* GetThemeProvider() const;
+ virtual ui::ThemeProvider* GetDefaultThemeProvider() const;
virtual void IsActiveChanged();
virtual void SetInitialFocus();
diff --git a/chrome/browser/ui/views/frame/browser_frame_win.h b/chrome/browser/ui/views/frame/browser_frame_win.h
index d39aa7f..a31b208 100644
--- a/chrome/browser/ui/views/frame/browser_frame_win.h
+++ b/chrome/browser/ui/views/frame/browser_frame_win.h
@@ -42,7 +42,7 @@ class BrowserFrameWin : public BrowserFrame, public views::WindowWin {
virtual gfx::Rect GetBoundsForTabStrip(BaseTabStrip* tabstrip) const;
virtual int GetHorizontalTabStripVerticalOffset(bool restored) const;
virtual void UpdateThrobber(bool running);
- virtual ThemeProvider* GetThemeProviderForFrame() const;
+ virtual ui::ThemeProvider* GetThemeProviderForFrame() const;
virtual bool AlwaysUseNativeFrame() const;
virtual views::View* GetFrameView() const;
virtual void TabStripDisplayModeChanged();
@@ -63,8 +63,8 @@ class BrowserFrameWin : public BrowserFrame, public views::WindowWin {
virtual LRESULT OnNCActivate(BOOL active);
virtual LRESULT OnNCHitTest(const CPoint& pt);
virtual void OnWindowPosChanged(WINDOWPOS* window_pos);
- virtual ThemeProvider* GetThemeProvider() const;
- virtual ThemeProvider* GetDefaultThemeProvider() const;
+ virtual ui::ThemeProvider* GetThemeProvider() const;
+ virtual ui::ThemeProvider* GetDefaultThemeProvider() const;
virtual void OnScreenReaderDetected();
// Overridden from views::Window:
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index fed8404..c0d454e 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -83,10 +83,10 @@
#include "views/window/window.h"
#if defined(OS_WIN)
-#include "app/view_prop.h"
#include "app/win/win_util.h"
#include "chrome/browser/aeropeek_manager.h"
#include "chrome/browser/jumplist_win.h"
+#include "ui/base/view_prop.h"
#elif defined(OS_LINUX)
#include "chrome/browser/ui/views/accelerator_table_gtk.h"
#include "views/window/hit_test.h"
@@ -179,7 +179,7 @@ BookmarkExtensionBackground::BookmarkExtensionBackground(
void BookmarkExtensionBackground::Paint(gfx::Canvas* canvas,
views::View* view) const {
- ThemeProvider* tp = host_view_->GetThemeProvider();
+ ui::ThemeProvider* tp = host_view_->GetThemeProvider();
int toolbar_overlap = host_view_->GetToolbarOverlap();
// The client edge is drawn below the toolbar bounds.
if (toolbar_overlap)
@@ -490,7 +490,7 @@ BrowserView* BrowserView::GetBrowserViewForNativeWindow(
#if defined(OS_WIN)
if (IsWindow(window)) {
return reinterpret_cast<BrowserView*>(
- app::ViewProp::GetValue(window, kBrowserViewKey));
+ ui::ViewProp::GetValue(window, kBrowserViewKey));
}
#else
if (window) {
@@ -1388,7 +1388,7 @@ gfx::Rect BrowserView::GrabWindowSnapshot(std::vector<unsigned char>*
views::Window* window = GetWindow();
#if defined(USE_X11)
- x11_util::GrabWindowSnapshot(window->GetNativeWindow(), png_representation);
+ ui::GrabWindowSnapshot(window->GetNativeWindow(), png_representation);
#elif defined(OS_WIN)
app::win::GrabWindowSnapshot(window->GetNativeWindow(), png_representation);
#endif
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 58b3123..8e74eae 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
#include "app/resource_bundle.h"
-#include "app/theme_provider.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/themes/browser_theme_provider.h"
@@ -17,6 +16,7 @@
#include "gfx/icon_util.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/theme_provider.h"
#include "views/window/client_view.h"
#include "views/window/window_resources.h"
@@ -244,7 +244,7 @@ int GlassBrowserFrameView::NonClientTopBorderHeight(
}
void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
gfx::Rect toolbar_bounds(browser_view_->GetToolbarBounds());
gfx::Point toolbar_origin(toolbar_bounds.origin());
@@ -361,7 +361,7 @@ void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) {
}
void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height());
// The client edges start below the toolbar upper corner images regardless
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 30b6084..9070699 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -6,7 +6,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/theme_provider.h"
#include "base/compiler_specific.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -22,6 +21,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/theme_provider.h"
#include "views/controls/button/image_button.h"
#include "views/controls/image_view.h"
#include "views/widget/root_view.h"
@@ -107,7 +107,7 @@ OpaqueBrowserFrameView::OpaqueBrowserFrameView(BrowserFrame* frame,
window_icon_(NULL),
frame_(frame),
browser_view_(browser_view) {
- ThemeProvider* tp = frame_->GetThemeProviderForFrame();
+ ui::ThemeProvider* tp = frame_->GetThemeProviderForFrame();
SkColor color = tp->GetColor(BrowserThemeProvider::COLOR_BUTTON_BACKGROUND);
SkBitmap* background =
tp->GetBitmapNamed(IDR_THEME_WINDOW_CONTROL_BACKGROUND);
@@ -541,7 +541,7 @@ gfx::Rect OpaqueBrowserFrameView::IconBounds() const {
}
void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
SkBitmap* top_left_corner = tp->GetBitmapNamed(IDR_WINDOW_TOP_LEFT_CORNER);
SkBitmap* top_right_corner =
@@ -659,7 +659,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
views::Window* window = frame_->GetWindow();
// Window frame mode and color
@@ -752,7 +752,7 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
// section so that we never break the gradient.
int split_point = kFrameShadowThickness * 2;
int bottom_y = y + split_point;
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
SkBitmap* toolbar_left = tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER);
int bottom_edge_height = std::min(toolbar_left->height(), h) - split_point;
@@ -857,7 +857,7 @@ void OpaqueBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) {
}
void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
int client_area_top = frame_->GetWindow()->GetClientView()->y();
int image_top = client_area_top;
diff --git a/chrome/browser/ui/views/js_modal_dialog_views.cc b/chrome/browser/ui/views/js_modal_dialog_views.cc
index 8d95f14..e3a05fc 100644
--- a/chrome/browser/ui/views/js_modal_dialog_views.cc
+++ b/chrome/browser/ui/views/js_modal_dialog_views.cc
@@ -5,12 +5,12 @@
#include "chrome/browser/ui/views/js_modal_dialog_views.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
#include "chrome/browser/ui/views/window.h"
#include "grit/generated_resources.h"
#include "ui/base/keycodes/keyboard_codes.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -21,7 +21,7 @@ JSModalDialogViews::JSModalDialogViews(
JavaScriptAppModalDialog* parent)
: parent_(parent),
message_box_view_(new MessageBoxView(
- parent->dialog_flags() | MessageBoxFlags::kAutoDetectAlignment,
+ parent->dialog_flags() | ui::MessageBoxFlags::kAutoDetectAlignment,
parent->message_text(), parent->default_prompt_text())) {
DCHECK(message_box_view_);
@@ -68,22 +68,22 @@ void JSModalDialogViews::CancelAppModalDialog() {
// JSModalDialogViews, views::DialogDelegate implementation:
int JSModalDialogViews::GetDefaultDialogButton() const {
- if (parent_->dialog_flags() & MessageBoxFlags::kFlagHasOKButton)
- return MessageBoxFlags::DIALOGBUTTON_OK;
+ if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasOKButton)
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK;
- if (parent_->dialog_flags() & MessageBoxFlags::kFlagHasCancelButton)
- return MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasCancelButton)
+ return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
- return MessageBoxFlags::DIALOGBUTTON_NONE;
+ return ui::MessageBoxFlags::DIALOGBUTTON_NONE;
}
int JSModalDialogViews::GetDialogButtons() const {
int dialog_buttons = 0;
- if (parent_->dialog_flags() & MessageBoxFlags::kFlagHasOKButton)
- dialog_buttons = MessageBoxFlags::DIALOGBUTTON_OK;
+ if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasOKButton)
+ dialog_buttons = ui::MessageBoxFlags::DIALOGBUTTON_OK;
- if (parent_->dialog_flags() & MessageBoxFlags::kFlagHasCancelButton)
- dialog_buttons |= MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasCancelButton)
+ dialog_buttons |= ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
return dialog_buttons;
}
@@ -117,12 +117,12 @@ void JSModalDialogViews::OnClose() {
}
std::wstring JSModalDialogViews::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
+ ui::MessageBoxFlags::DialogButton button) const {
if (parent_->is_before_unload_dialog()) {
- if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) {
return UTF16ToWide(l10n_util::GetStringUTF16(
IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL));
- } else if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) {
+ } else if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL) {
return UTF16ToWide(l10n_util::GetStringUTF16(
IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL));
}
diff --git a/chrome/browser/ui/views/js_modal_dialog_views.h b/chrome/browser/ui/views/js_modal_dialog_views.h
index 2ff27f9..1a9a7c3 100644
--- a/chrome/browser/ui/views/js_modal_dialog_views.h
+++ b/chrome/browser/ui/views/js_modal_dialog_views.h
@@ -10,8 +10,8 @@
#include <string>
-#include "app/message_box_flags.h"
#include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
+#include "ui/base/message_box_flags.h"
#include "views/window/dialog_delegate.h"
class MessageBoxView;
@@ -39,7 +39,7 @@ class JSModalDialogViews : public NativeAppModalDialog,
virtual bool Cancel();
virtual bool Accept();
virtual std::wstring GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const;
+ ui::MessageBoxFlags::DialogButton button) const;
// Overridden from views::WindowDelegate:
virtual bool IsModal() const { return true; }
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index d77d597..1e8943c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -10,7 +10,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/theme_provider.h"
#include "base/command_line.h"
#include "base/stl_util-inl.h"
#include "base/utf_string_conversions.h"
@@ -44,6 +43,7 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/base/theme_provider.h"
#include "views/controls/label.h"
#include "views/drag_utils.h"
diff --git a/chrome/browser/ui/views/options/advanced_page_view.cc b/chrome/browser/ui/views/options/advanced_page_view.cc
index 128d71a..81a8498 100644
--- a/chrome/browser/ui/views/options/advanced_page_view.cc
+++ b/chrome/browser/ui/views/options/advanced_page_view.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/views/options/advanced_page_view.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -16,6 +15,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/controls/button/native_button.h"
#include "views/controls/scroll_view.h"
@@ -38,12 +38,12 @@ class ResetDefaultsConfirmBox : public views::DialogDelegate {
protected:
// views::DialogDelegate
virtual std::wstring GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
+ ui::MessageBoxFlags::DialogButton button) const {
switch (button) {
- case MessageBoxFlags::DIALOGBUTTON_OK:
+ case ui::MessageBoxFlags::DIALOGBUTTON_OK:
return UTF16ToWide(
l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_OKLABEL));
- case MessageBoxFlags::DIALOGBUTTON_CANCEL:
+ case ui::MessageBoxFlags::DIALOGBUTTON_CANCEL:
return UTF16ToWide(
l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_CANCELLABEL));
default:
@@ -71,7 +71,8 @@ class ResetDefaultsConfirmBox : public views::DialogDelegate {
IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS);
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
- MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
+ ui::MessageBoxFlags::kFlagHasMessage |
+ ui::MessageBoxFlags::kFlagHasOKButton,
UTF16ToWide(
l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_MESSAGE)).c_str(),
std::wstring(),
diff --git a/chrome/browser/ui/views/options/exceptions_page_view.cc b/chrome/browser/ui/views/options/exceptions_page_view.cc
index 7d2c71f..de037ca 100644
--- a/chrome/browser/ui/views/options/exceptions_page_view.cc
+++ b/chrome/browser/ui/views/options/exceptions_page_view.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
+#include "ui/base/text/text_elider.h"
#include "views/background.h"
#include "views/controls/button/native_button.h"
#include "views/grid_layout.h"
@@ -55,7 +56,7 @@ void ExceptionsTableModel::OnPasswordStoreRequestDone(
UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
for (size_t i = 0; i < result.size(); ++i) {
saved_signons_.push_back(new PasswordRow(
- gfx::SortedDisplayURL(result[i]->origin, languages), result[i]));
+ ui::SortedDisplayURL(result[i]->origin, languages), result[i]));
}
if (observer_)
observer_->OnModelChanged();
diff --git a/chrome/browser/ui/views/options/passwords_page_view.cc b/chrome/browser/ui/views/options/passwords_page_view.cc
index 19cab6d..138a7b2 100644
--- a/chrome/browser/ui/views/options/passwords_page_view.cc
+++ b/chrome/browser/ui/views/options/passwords_page_view.cc
@@ -119,7 +119,7 @@ void PasswordsTableModel::OnPasswordStoreRequestDone(
UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
for (size_t i = 0; i < result.size(); ++i) {
saved_signons_[i] = new PasswordRow(
- gfx::SortedDisplayURL(result[i]->origin, languages), result[i]);
+ ui::SortedDisplayURL(result[i]->origin, languages), result[i]);
}
if (observer_)
observer_->OnModelChanged();
diff --git a/chrome/browser/ui/views/options/passwords_page_view.h b/chrome/browser/ui/views/options/passwords_page_view.h
index 36f0d3c..76eed4e 100644
--- a/chrome/browser/ui/views/options/passwords_page_view.h
+++ b/chrome/browser/ui/views/options/passwords_page_view.h
@@ -8,7 +8,6 @@
#include <vector>
-#include "app/text_elider.h"
#include "base/compiler_specific.h"
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
@@ -18,6 +17,7 @@
#include "chrome/browser/ui/views/confirm_message_box_dialog.h"
#include "chrome/browser/ui/views/options/options_page_view.h"
#include "ui/base/models/table_model.h"
+#include "ui/base/text/text_elider.h"
#include "views/controls/button/native_button.h"
#include "views/controls/label.h"
#include "views/controls/table/table_view.h"
@@ -102,13 +102,13 @@ class PasswordsTableModel : public TableModel,
// Wraps the PasswordForm from the database and caches the display URL for
// quick sorting.
struct PasswordRow {
- PasswordRow(const gfx::SortedDisplayURL& url,
+ PasswordRow(const ui::SortedDisplayURL& url,
webkit_glue::PasswordForm* password_form)
: display_url(url), form(password_form) {
}
// Contains the URL that is displayed along with the
- gfx::SortedDisplayURL display_url;
+ ui::SortedDisplayURL display_url;
// The underlying PasswordForm. We own this.
scoped_ptr<webkit_glue::PasswordForm> form;
diff --git a/chrome/browser/ui/views/repost_form_warning_view.cc b/chrome/browser/ui/views/repost_form_warning_view.cc
index 1d0de64..ec83568 100644
--- a/chrome/browser/ui/views/repost_form_warning_view.cc
+++ b/chrome/browser/ui/views/repost_form_warning_view.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/views/repost_form_warning_view.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_window.h"
@@ -13,6 +12,7 @@
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -35,7 +35,7 @@ RepostFormWarningView::RepostFormWarningView(
: controller_(new RepostFormWarningController(tab_contents)),
message_box_view_(NULL) {
message_box_view_ = new MessageBoxView(
- MessageBoxFlags::kIsConfirmMessageBox,
+ ui::MessageBoxFlags::kIsConfirmMessageBox,
UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING)),
std::wstring());
controller_->Show(this);
@@ -52,10 +52,10 @@ std::wstring RepostFormWarningView::GetWindowTitle() const {
}
std::wstring RepostFormWarningView::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- if (button == MessageBoxFlags::DIALOGBUTTON_OK)
+ ui::MessageBoxFlags::DialogButton button) const {
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK)
return UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_RESEND));
- if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL)
+ if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL)
return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANCEL));
return std::wstring();
}
diff --git a/chrome/browser/ui/views/restart_message_box.cc b/chrome/browser/ui/views/restart_message_box.cc
index 0ff60e7..e14dce3 100644
--- a/chrome/browser/ui/views/restart_message_box.cc
+++ b/chrome/browser/ui/views/restart_message_box.cc
@@ -5,10 +5,10 @@
#include "chrome/browser/ui/views/restart_message_box.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -22,12 +22,12 @@ void RestartMessageBox::ShowMessageBox(gfx::NativeWindow parent_window) {
}
int RestartMessageBox::GetDialogButtons() const {
- return MessageBoxFlags::DIALOGBUTTON_OK;
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK;
}
std::wstring RestartMessageBox::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- DCHECK(button == MessageBoxFlags::DIALOGBUTTON_OK);
+ ui::MessageBoxFlags::DialogButton button) const {
+ DCHECK(button == ui::MessageBoxFlags::DIALOGBUTTON_OK);
return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
@@ -54,7 +54,8 @@ RestartMessageBox::RestartMessageBox(gfx::NativeWindow parent_window) {
const int kDialogWidth = 400;
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
- MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
+ ui::MessageBoxFlags::kFlagHasMessage |
+ ui::MessageBoxFlags::kFlagHasOKButton,
UTF16ToWide(
l10n_util::GetStringUTF16(IDS_OPTIONS_RESTART_REQUIRED)).c_str(),
std::wstring(),
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 0e77b8d..027c0a3 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include "app/resource_bundle.h"
-#include "app/text_elider.h"
#include "base/i18n/rtl.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -24,6 +23,7 @@
#include "third_party/skia/include/core/SkRect.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/linear_animation.h"
+#include "ui/base/text/text_elider.h"
#include "views/controls/label.h"
#include "views/controls/scrollbar/native_scroll_bar.h"
#include "views/screen.h"
@@ -73,7 +73,7 @@ class StatusBubbleViews::StatusView : public views::Label,
public ui::AnimationDelegate {
public:
StatusView(StatusBubble* status_bubble, views::Widget* popup,
- ThemeProvider* theme_provider)
+ ui::ThemeProvider* theme_provider)
: ALLOW_THIS_IN_INITIALIZER_LIST(ui::LinearAnimation(kFramerate, this)),
stage_(BUBBLE_HIDDEN),
style_(STYLE_STANDARD),
@@ -174,7 +174,7 @@ class StatusBubbleViews::StatusView : public views::Label,
double opacity_end_;
// Holds the theme provider of the frame that created us.
- ThemeProvider* theme_provider_;
+ ui::ThemeProvider* theme_provider_;
};
void StatusBubbleViews::StatusView::SetText(const string16& text,
@@ -648,7 +648,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const string16& languages) {
popup_->GetBounds(&popup_bounds, true);
int text_width = static_cast<int>(popup_bounds.width() -
(kShadowThickness * 2) - kTextPositionX - kTextHorizPadding - 1);
- url_text_ = gfx::ElideUrl(url, view_->Label::font(),
+ url_text_ = ui::ElideUrl(url, view_->Label::font(),
text_width, UTF16ToWideHack(languages));
std::wstring original_url_text =
@@ -803,7 +803,7 @@ void StatusBubbleViews::ExpandBubble() {
gfx::Rect popup_bounds;
popup_->GetBounds(&popup_bounds, true);
int max_status_bubble_width = GetMaxStatusBubbleWidth();
- url_text_ = gfx::ElideUrl(url_, view_->Label::font(),
+ url_text_ = ui::ElideUrl(url_, view_->Label::font(),
max_status_bubble_width, UTF16ToWideHack(languages_));
int expanded_bubble_width =std::max(GetStandardStatusBubbleWidth(),
std::min(view_->Label::font().GetStringWidth(url_text_) +
diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc
index 40b4ca2..7fb1560 100644
--- a/chrome/browser/ui/views/tab_icon_view.cc
+++ b/chrome/browser/ui/views/tab_icon_view.cc
@@ -10,7 +10,6 @@
#endif
#include "app/resource_bundle.h"
-#include "app/theme_provider.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "chrome/app/chrome_command_ids.h"
@@ -18,6 +17,7 @@
#include "gfx/favicon_size.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/theme_provider.h"
#if defined(OS_WIN)
#include "chrome/browser/app_icon_win.h"
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 5e00eb9..ae745c5 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -8,7 +8,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/theme_provider.h"
#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -24,6 +23,7 @@
#include "grit/theme_resources.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/animation/throb_animation.h"
+#include "ui/base/theme_provider.h"
#include "views/controls/button/image_button.h"
// How long the pulse throb takes.
@@ -305,8 +305,8 @@ AccessibilityTypes::Role BaseTab::GetAccessibleRole() {
return AccessibilityTypes::ROLE_PAGETAB;
}
-ThemeProvider* BaseTab::GetThemeProvider() {
- ThemeProvider* tp = View::GetThemeProvider();
+ui::ThemeProvider* BaseTab::GetThemeProvider() {
+ ui::ThemeProvider* tp = View::GetThemeProvider();
return tp ? tp : theme_provider_;
}
@@ -359,7 +359,7 @@ void BaseTab::PaintIcon(gfx::Canvas* canvas, int x, int y) {
favicon_x += (data().favicon.width() - kFavIconSize) / 2;
if (data().network_state != TabRendererData::NETWORK_STATE_NONE) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
SkBitmap frames(*tp->GetBitmapNamed(
(data().network_state == TabRendererData::NETWORK_STATE_WAITING) ?
IDR_THROBBER_WAITING : IDR_THROBBER));
diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h
index b4ce54d..ae362ad 100644
--- a/chrome/browser/ui/views/tabs/base_tab.h
+++ b/chrome/browser/ui/views/tabs/base_tab.h
@@ -72,7 +72,7 @@ class BaseTab : public ui::AnimationDelegate,
// Set the theme provider - because we get detached, we are frequently
// outside of a hierarchy with a theme provider at the top. This should be
// called whenever we're detached or attached to a hierarchy.
- void set_theme_provider(ThemeProvider* provider) {
+ void set_theme_provider(ui::ThemeProvider* provider) {
theme_provider_ = provider;
}
@@ -191,7 +191,7 @@ class BaseTab : public ui::AnimationDelegate,
// animations.
bool throbber_disabled_;
- ThemeProvider* theme_provider_;
+ ui::ThemeProvider* theme_provider_;
// The offset used to animate the favicon location. This is used when the tab
// crashes.
diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.h b/chrome/browser/ui/views/tabs/base_tab_strip.h
index 4f5dc01..1fe7e3c 100644
--- a/chrome/browser/ui/views/tabs/base_tab_strip.h
+++ b/chrome/browser/ui/views/tabs/base_tab_strip.h
@@ -17,7 +17,6 @@
class BaseTab;
class DraggedTabController;
class TabStripController;
-class ThemeProvider;
// Base class for the view tab strip implementations.
class BaseTabStrip : public views::View,
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index e24478e..b751330 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -525,7 +525,7 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
int offset = GetX(views::View::APPLY_MIRRORING_TRANSFORMATION) +
background_offset_.x();
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
DCHECK(tp) << "Unable to get theme provider";
SkBitmap* tab_bg = GetThemeProvider()->GetBitmapNamed(IDR_THEME_TOOLBAR);
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 7145017..9c7ca46 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -498,7 +498,7 @@ void TabStrip::Init() {
}
void TabStrip::LoadNewTabButtonImage() {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
// If we don't have a theme provider yet, it means we do not have a
// root view, and are therefore in a test.
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h
index b15b86b..6b2ab25 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.h
+++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -261,7 +261,7 @@ class TabStrip : public BaseTabStrip,
// The size of the new tab button must be hardcoded because we need to be
// able to lay it out before we are able to get its image from the
- // ThemeProvider. It also makes sense to do this, because the size of the
+ // ui::ThemeProvider. It also makes sense to do this, because the size of the
// new tab button should not need to be calculated dynamically.
static const int kNewTabButtonWidth = 28;
static const int kNewTabButtonHeight = 18;
diff --git a/chrome/browser/ui/views/theme_background.cc b/chrome/browser/ui/views/theme_background.cc
index be8e8f7..857731f 100644
--- a/chrome/browser/ui/views/theme_background.cc
+++ b/chrome/browser/ui/views/theme_background.cc
@@ -30,7 +30,7 @@ void ThemeBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
background = rb.GetBitmapNamed(IDR_THEME_FRAME_INACTIVE);
} else {
Profile* profile = browser_view_->browser()->profile();
- ThemeProvider* theme = profile->GetThemeProvider();
+ ui::ThemeProvider* theme = profile->GetThemeProvider();
if (browser_view_->IsActive()) {
background = theme->GetBitmapNamed(
profile->IsOffTheRecord() ?
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index e396d37..8e82fc4 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -657,7 +657,7 @@ int ToolbarView::PopupTopSpacing() const {
}
void ToolbarView::LoadImages() {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
back_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_BACK));
back_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_BACK_H));
@@ -717,7 +717,7 @@ void ToolbarView::UpdateAppMenuBadge() {
}
SkBitmap ToolbarView::GetAppMenuIcon(views::CustomButton::ButtonState state) {
- ThemeProvider* tp = GetThemeProvider();
+ ui::ThemeProvider* tp = GetThemeProvider();
int id = 0;
switch (state) {
diff --git a/chrome/browser/ui/views/update_recommended_message_box.cc b/chrome/browser/ui/views/update_recommended_message_box.cc
index c3f8f6a..d03eabb 100644
--- a/chrome/browser/ui/views/update_recommended_message_box.cc
+++ b/chrome/browser/ui/views/update_recommended_message_box.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/views/update_recommended_message_box.h"
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
@@ -14,6 +13,7 @@
#include "chrome/common/pref_names.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -47,15 +47,15 @@ bool UpdateRecommendedMessageBox::Accept() {
}
int UpdateRecommendedMessageBox::GetDialogButtons() const {
- return MessageBoxFlags::DIALOGBUTTON_OK |
- MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ return ui::MessageBoxFlags::DIALOGBUTTON_OK |
+ ui::MessageBoxFlags::DIALOGBUTTON_CANCEL;
}
std::wstring UpdateRecommendedMessageBox::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- DCHECK(button == MessageBoxFlags::DIALOGBUTTON_OK ||
- button == MessageBoxFlags::DIALOGBUTTON_CANCEL);
- return button == MessageBoxFlags::DIALOGBUTTON_OK ?
+ ui::MessageBoxFlags::DialogButton button) const {
+ DCHECK(button == ui::MessageBoxFlags::DIALOGBUTTON_OK ||
+ button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL);
+ return button == ui::MessageBoxFlags::DIALOGBUTTON_OK ?
UTF16ToWide(l10n_util::GetStringUTF16(IDS_RESTART_AND_UPDATE)) :
UTF16ToWide(l10n_util::GetStringUTF16(IDS_NOT_NOW));
}
@@ -90,7 +90,8 @@ UpdateRecommendedMessageBox::UpdateRecommendedMessageBox(
const string16 product_name = l10n_util::GetStringUTF16(kProductNameId);
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
- MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
+ ui::MessageBoxFlags::kFlagHasMessage |
+ ui::MessageBoxFlags::kFlagHasOKButton,
UTF16ToWide(l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED,
product_name)),
std::wstring(),
diff --git a/chrome/browser/ui/views/user_data_dir_dialog.cc b/chrome/browser/ui/views/user_data_dir_dialog.cc
index e76415d..83fcf8a 100644
--- a/chrome/browser/ui/views/user_data_dir_dialog.cc
+++ b/chrome/browser/ui/views/user_data_dir_dialog.cc
@@ -3,12 +3,12 @@
// found in the LICENSE file.
#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/views/user_data_dir_dialog.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/message_box_flags.h"
#include "views/controls/message_box_view.h"
#include "views/widget/widget.h"
#include "views/window/window.h"
@@ -30,7 +30,8 @@ UserDataDirDialog::UserDataDirDialog(const FilePath& user_data_dir)
IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
WideToUTF16Hack(user_data_dir.ToWStringHack())));
const int kDialogWidth = 400;
- message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox,
+ message_box_view_ = new MessageBoxView(
+ ui::MessageBoxFlags::kIsConfirmMessageBox,
message_text.c_str(), std::wstring(), kDialogWidth);
views::Window::CreateChromeWindow(NULL, gfx::Rect(), this)->Show();
@@ -41,13 +42,13 @@ UserDataDirDialog::~UserDataDirDialog() {
}
std::wstring UserDataDirDialog::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
+ ui::MessageBoxFlags::DialogButton button) const {
switch (button) {
- case MessageBoxFlags::DIALOGBUTTON_OK:
+ case ui::MessageBoxFlags::DIALOGBUTTON_OK:
return UTF16ToWide(l10n_util::GetStringUTF16(
IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON));
- case MessageBoxFlags::DIALOGBUTTON_CANCEL:
+ case ui::MessageBoxFlags::DIALOGBUTTON_CANCEL:
return UTF16ToWide(l10n_util::GetStringUTF16(
IDS_CANT_WRITE_USER_DIRECTORY_EXIT_BUTTON));
default: