summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/views')
-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
40 files changed, 148 insertions, 140 deletions
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: