summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/back_forward_menu_model.cc13
-rw-r--r--chrome/browser/back_forward_menu_model.h5
-rw-r--r--chrome/browser/back_forward_menu_model_unittest.cc70
-rw-r--r--chrome/browser/back_forward_menu_model_views.cc2
-rw-r--r--chrome/browser/back_forward_menu_model_views.h2
-rw-r--r--chrome/browser/browser_main.cc3
-rw-r--r--chrome/browser/gtk/back_forward_menu_model_gtk.cc2
-rw-r--r--chrome/browser/views/bookmark_context_menu.h9
-rw-r--r--chrome/browser/views/browser_bubble_gtk.cc2
-rw-r--r--chrome/browser/views/browser_dialogs.h1
-rw-r--r--chrome/browser/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/views/frame/browser_view.h2
-rw-r--r--chrome/browser/views/info_bubble.cc2
-rw-r--r--chrome/browser/views/tab_contents/render_view_context_menu_win.cc11
-rw-r--r--chrome/browser/views/tab_contents/render_view_context_menu_win.h8
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_view_gtk.cc2
-rw-r--r--chrome/browser/views/toolbar_view.cc14
-rw-r--r--chrome/chrome.gyp1
18 files changed, 77 insertions, 76 deletions
diff --git a/chrome/browser/back_forward_menu_model.cc b/chrome/browser/back_forward_menu_model.cc
index 984d06b..e7b6d68 100644
--- a/chrome/browser/back_forward_menu_model.cc
+++ b/chrome/browser/back_forward_menu_model.cc
@@ -205,18 +205,17 @@ bool BackForwardMenuModel::IsSeparator(int menu_id) const {
return menu_id == history_items + 1;
}
-std::wstring BackForwardMenuModel::GetItemLabel(int menu_id) const {
+string16 BackForwardMenuModel::GetItemLabel(int menu_id) const {
// Return label "Show Full History" for the last item of the menu.
if (menu_id == GetTotalItemCount())
- return l10n_util::GetString(IDS_SHOWFULLHISTORY_LINK);
+ return l10n_util::GetStringUTF16(IDS_SHOWFULLHISTORY_LINK);
// Return an empty string for a separator.
if (IsSeparator(menu_id))
- return L"";
+ return string16();
NavigationEntry* entry = GetNavigationEntry(menu_id);
- return UTF16ToWideHack(entry->GetTitleForDisplay(
- &GetTabContents()->controller()));
+ return entry->GetTitleForDisplay(&GetTabContents()->controller());
}
const SkBitmap& BackForwardMenuModel::GetItemIcon(int menu_id) const {
@@ -239,8 +238,8 @@ bool BackForwardMenuModel::ItemHasCommand(int menu_id) const {
return menu_id - 1 < GetTotalItemCount() && !IsSeparator(menu_id);
}
-std::wstring BackForwardMenuModel::GetShowFullHistoryLabel() const {
- return l10n_util::GetString(IDS_SHOWFULLHISTORY_LINK);
+string16 BackForwardMenuModel::GetShowFullHistoryLabel() const {
+ return l10n_util::GetStringUTF16(IDS_SHOWFULLHISTORY_LINK);
}
TabContents* BackForwardMenuModel::GetTabContents() const {
diff --git a/chrome/browser/back_forward_menu_model.h b/chrome/browser/back_forward_menu_model.h
index 9f85a7e..acbcdaf 100644
--- a/chrome/browser/back_forward_menu_model.h
+++ b/chrome/browser/back_forward_menu_model.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/string16.h"
class Browser;
class SkBitmap;
@@ -92,7 +93,7 @@ class BackForwardMenuModel {
// Get the display text for the item. This should not be called on a
// separator.
- std::wstring GetItemLabel(int menu_id) const;
+ string16 GetItemLabel(int menu_id) const;
// Get the display icon for the item. This should not be called on a
// separator or an item that does not have an icon.
@@ -112,7 +113,7 @@ class BackForwardMenuModel {
#endif
// Allow the unit test to use the "Show Full History" label.
- std::wstring GetShowFullHistoryLabel() const;
+ string16 GetShowFullHistoryLabel() const;
// Retrieves the TabContents pointer to use, which is either the one that
// the unit test sets (using SetTabContentsForUnitTest) or the one from
diff --git a/chrome/browser/back_forward_menu_model_unittest.cc b/chrome/browser/back_forward_menu_model_unittest.cc
index 241a95c..6f442e5 100644
--- a/chrome/browser/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/back_forward_menu_model_unittest.cc
@@ -90,8 +90,8 @@ TEST_F(BackFwdMenuModelTest, BasicCase) {
// There're two more items here: a separator and a "Show Full History".
EXPECT_EQ(9, back_model->GetTotalItemCount());
EXPECT_EQ(0, forward_model->GetTotalItemCount());
- EXPECT_EQ(L"C2", back_model->GetItemLabel(1));
- EXPECT_EQ(L"A1", back_model->GetItemLabel(7));
+ EXPECT_EQ(ASCIIToUTF16("C2"), back_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("A1"), back_model->GetItemLabel(7));
EXPECT_EQ(back_model->GetShowFullHistoryLabel(),
back_model->GetItemLabel(9));
@@ -106,8 +106,8 @@ TEST_F(BackFwdMenuModelTest, BasicCase) {
EXPECT_EQ(0, back_model->GetTotalItemCount());
EXPECT_EQ(9, forward_model->GetTotalItemCount());
- EXPECT_EQ(L"A2", forward_model->GetItemLabel(1));
- EXPECT_EQ(L"C3", forward_model->GetItemLabel(7));
+ EXPECT_EQ(ASCIIToUTF16("A2"), forward_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("C3"), forward_model->GetItemLabel(7));
EXPECT_EQ(forward_model->GetShowFullHistoryLabel(),
forward_model->GetItemLabel(9));
@@ -121,12 +121,12 @@ TEST_F(BackFwdMenuModelTest, BasicCase) {
EXPECT_EQ(6, back_model->GetTotalItemCount());
EXPECT_EQ(5, forward_model->GetTotalItemCount());
- EXPECT_EQ(L"B1", back_model->GetItemLabel(1));
- EXPECT_EQ(L"A1", back_model->GetItemLabel(4));
+ EXPECT_EQ(ASCIIToUTF16("B1"), back_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("A1"), back_model->GetItemLabel(4));
EXPECT_EQ(back_model->GetShowFullHistoryLabel(),
back_model->GetItemLabel(6));
- EXPECT_EQ(L"C1", forward_model->GetItemLabel(1));
- EXPECT_EQ(L"C3", forward_model->GetItemLabel(3));
+ EXPECT_EQ(ASCIIToUTF16("C1"), forward_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("C3"), forward_model->GetItemLabel(3));
EXPECT_EQ(forward_model->GetShowFullHistoryLabel(),
forward_model->GetItemLabel(5));
}
@@ -179,7 +179,7 @@ TEST_F(BackFwdMenuModelTest, MaxItemsTest) {
EXPECT_EQ(BackForwardMenuModel::kMaxHistoryItems + 2 + chapter_stop_offset,
back_model->GetTotalItemCount());
EXPECT_EQ(0, forward_model->GetTotalItemCount());
- EXPECT_EQ(L"K1", back_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("K1"), back_model->GetItemLabel(1));
EXPECT_EQ(back_model->GetShowFullHistoryLabel(),
back_model->GetItemLabel(BackForwardMenuModel::kMaxHistoryItems + 2 +
chapter_stop_offset));
@@ -198,7 +198,7 @@ TEST_F(BackFwdMenuModelTest, MaxItemsTest) {
EXPECT_EQ(BackForwardMenuModel::kMaxHistoryItems + 2 + chapter_stop_offset,
forward_model->GetTotalItemCount());
EXPECT_EQ(0, back_model->GetTotalItemCount());
- EXPECT_EQ(L"A2", forward_model->GetItemLabel(1));
+ EXPECT_EQ(ASCIIToUTF16("A2"), forward_model->GetItemLabel(1));
EXPECT_EQ(forward_model->GetShowFullHistoryLabel(),
forward_model->GetItemLabel(BackForwardMenuModel::kMaxHistoryItems + 2 +
chapter_stop_offset));
@@ -293,30 +293,30 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) {
// Check to see if the chapter stops have the right labels.
int index = BackForwardMenuModel::kMaxHistoryItems + 1;
- EXPECT_EQ(L"", back_model->GetItemLabel(index++)); // separator.
- EXPECT_EQ(L"F3", back_model->GetItemLabel(index++));
- EXPECT_EQ(L"E3", back_model->GetItemLabel(index++));
- EXPECT_EQ(L"D3", back_model->GetItemLabel(index++));
- EXPECT_EQ(L"C3", back_model->GetItemLabel(index++));
- EXPECT_EQ(L"B3", back_model->GetItemLabel(index)); // max 5 chapter stops.
- EXPECT_EQ(L"", back_model->GetItemLabel(index + 1)); // separator.
+ EXPECT_EQ(ASCIIToUTF16(""), back_model->GetItemLabel(index++)); // separator.
+ EXPECT_EQ(ASCIIToUTF16("F3"), back_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("E3"), back_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("D3"), back_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("C3"), back_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("B3"), back_model->GetItemLabel(index)); // max 5 chapter stops.
+ EXPECT_EQ(ASCIIToUTF16(""), back_model->GetItemLabel(index + 1)); // separator.
EXPECT_EQ(back_model->GetShowFullHistoryLabel(),
back_model->GetItemLabel(index + 2));
// If we go back two we should still see the same chapter stop at the end.
GoBack();
- EXPECT_EQ(L"B3", back_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("B3"), back_model->GetItemLabel(index));
GoBack();
- EXPECT_EQ(L"B3", back_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("B3"), back_model->GetItemLabel(index));
// But if we go back again, it should change.
GoBack();
- EXPECT_EQ(L"A3", back_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("A3"), back_model->GetItemLabel(index));
GoBack();
- EXPECT_EQ(L"A3", back_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("A3"), back_model->GetItemLabel(index));
GoBack();
- EXPECT_EQ(L"A3", back_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("A3"), back_model->GetItemLabel(index));
GoBack();
- EXPECT_EQ(L"", back_model->GetItemLabel(index)); // It is now a separator.
+ EXPECT_EQ(ASCIIToUTF16(""), back_model->GetItemLabel(index)); // It is now a separator.
NavigateToOffset(6); // Undo our position change.
// Go back enough to make sure no chapter stops should appear.
@@ -337,29 +337,29 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) {
// Check to see if the chapter stops have the right labels.
index = BackForwardMenuModel::kMaxHistoryItems + 1;
- EXPECT_EQ(L"", forward_model->GetItemLabel(index++)); // separator.
- EXPECT_EQ(L"E3", forward_model->GetItemLabel(index++));
- EXPECT_EQ(L"F3", forward_model->GetItemLabel(index++));
- EXPECT_EQ(L"G3", forward_model->GetItemLabel(index++));
- EXPECT_EQ(L"H3", forward_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16(""), forward_model->GetItemLabel(index++)); // separator.
+ EXPECT_EQ(ASCIIToUTF16("E3"), forward_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("F3"), forward_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("G3"), forward_model->GetItemLabel(index++));
+ EXPECT_EQ(ASCIIToUTF16("H3"), forward_model->GetItemLabel(index++));
// max 5 chapter stops.
- EXPECT_EQ(L"I3", forward_model->GetItemLabel(index));
- EXPECT_EQ(L"", forward_model->GetItemLabel(index + 1)); // separator.
+ EXPECT_EQ(ASCIIToUTF16("I3"), forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16(""), forward_model->GetItemLabel(index + 1)); // separator.
EXPECT_EQ(forward_model->GetShowFullHistoryLabel(),
forward_model->GetItemLabel(index + 2));
// If we advance one we should still see the same chapter stop at the end.
GoForward();
- EXPECT_EQ(L"I3", forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("I3"), forward_model->GetItemLabel(index));
// But if we advance one again, it should change.
GoForward();
- EXPECT_EQ(L"J3", forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("J3"), forward_model->GetItemLabel(index));
GoForward();
- EXPECT_EQ(L"J3", forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("J3"), forward_model->GetItemLabel(index));
GoForward();
- EXPECT_EQ(L"J3", forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("J3"), forward_model->GetItemLabel(index));
GoForward();
- EXPECT_EQ(L"K3", forward_model->GetItemLabel(index));
+ EXPECT_EQ(ASCIIToUTF16("K3"), forward_model->GetItemLabel(index));
// Now test the boundary cases by using the chapter stop function directly.
// Out of bounds, first too far right (incrementing), then too far left.
diff --git a/chrome/browser/back_forward_menu_model_views.cc b/chrome/browser/back_forward_menu_model_views.cc
index fd21241..d689fc7 100644
--- a/chrome/browser/back_forward_menu_model_views.cc
+++ b/chrome/browser/back_forward_menu_model_views.cc
@@ -43,7 +43,7 @@ int BackForwardMenuModelViews::GetCommandIdAt(int index) const {
return index + 1;
}
-std::wstring BackForwardMenuModelViews::GetLabelAt(int index) const {
+string16 BackForwardMenuModelViews::GetLabelAt(int index) const {
return GetItemLabel(GetCommandIdAt(index));
}
diff --git a/chrome/browser/back_forward_menu_model_views.h b/chrome/browser/back_forward_menu_model_views.h
index e97a39a..03d5e11 100644
--- a/chrome/browser/back_forward_menu_model_views.h
+++ b/chrome/browser/back_forward_menu_model_views.h
@@ -30,7 +30,7 @@ class BackForwardMenuModelViews : public BackForwardMenuModel,
virtual int GetItemCount() const;
virtual ItemType GetTypeAt(int index) const;
virtual int GetCommandIdAt(int index) const;
- virtual std::wstring GetLabelAt(int index) const;
+ virtual string16 GetLabelAt(int index) const;
virtual bool IsLabelDynamicAt(int index) const;
virtual bool GetAcceleratorAt(int index,
views::Accelerator* accelerator) const;
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index cc39d22..b29fa21 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -92,7 +92,6 @@
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/rlz/rlz.h"
-#include "chrome/browser/views/chrome_views_delegate.h"
#include "chrome/browser/views/user_data_dir_dialog.h"
#include "chrome/common/env_vars.h"
#include "chrome/installer/util/helper.h"
@@ -109,6 +108,8 @@
#if defined(TOOLKIT_GTK)
#include "chrome/common/gtk_util.h"
+#elif defined(TOOLKIT_VIEWS)
+#include "chrome/browser/views/chrome_views_delegate.h"
#endif
namespace Platform {
diff --git a/chrome/browser/gtk/back_forward_menu_model_gtk.cc b/chrome/browser/gtk/back_forward_menu_model_gtk.cc
index 8bce806..6747b98 100644
--- a/chrome/browser/gtk/back_forward_menu_model_gtk.cc
+++ b/chrome/browser/gtk/back_forward_menu_model_gtk.cc
@@ -23,7 +23,7 @@ bool BackForwardMenuModelGtk::IsItemSeparator(int command_id) const {
}
std::string BackForwardMenuModelGtk::GetLabel(int command_id) const {
- return WideToUTF8(GetItemLabel(command_id));
+ return UTF16ToUTF8(GetItemLabel(command_id));
}
bool BackForwardMenuModelGtk::HasIcon(int command_id) const {
diff --git a/chrome/browser/views/bookmark_context_menu.h b/chrome/browser/views/bookmark_context_menu.h
index d1d7bad5..96304d4 100644
--- a/chrome/browser/views/bookmark_context_menu.h
+++ b/chrome/browser/views/bookmark_context_menu.h
@@ -29,7 +29,7 @@ class BookmarkContextMenu : public BookmarkContextMenuControllerDelegate,
virtual void ExecuteCommand(int command_id);
virtual bool IsItemChecked(int command_id) const;
virtual bool IsCommandEnabled(int command_id) const;
-
+
// Overridden from BookmarkContextMenuControllerDelegate:
virtual void CloseMenu();
virtual void AddItem(int command_id);
@@ -38,15 +38,14 @@ class BookmarkContextMenu : public BookmarkContextMenuControllerDelegate,
virtual void AddCheckboxItem(int command_id);
private:
-
scoped_ptr<BookmarkContextMenuController> controller_;
- // The window used to parent dialog boxes opened from the context menu.
- gfx::NativeWindow parent_window_;
+ // The parent of dialog boxes opened from the context menu.
+ gfx::NativeView parent_window_;
// The menu itself.
scoped_ptr<views::MenuItemView> menu_;
-
+
DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu);
};
diff --git a/chrome/browser/views/browser_bubble_gtk.cc b/chrome/browser/views/browser_bubble_gtk.cc
index bc717ab..b30fb1c 100644
--- a/chrome/browser/views/browser_bubble_gtk.cc
+++ b/chrome/browser/views/browser_bubble_gtk.cc
@@ -14,7 +14,7 @@ void BrowserBubble::InitPopup() {
views::WidgetGtk* pop = new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP);
pop->set_delete_on_destroy(false);
pop->SetOpacity(0xFF);
- pop->Init(native_view, bounds_, false);
+ pop->Init(native_view, bounds_);
pop->SetContentsView(view_);
popup_.reset(pop);
Reposition();
diff --git a/chrome/browser/views/browser_dialogs.h b/chrome/browser/views/browser_dialogs.h
index 9f33f64..c2b13f3 100644
--- a/chrome/browser/views/browser_dialogs.h
+++ b/chrome/browser/views/browser_dialogs.h
@@ -21,6 +21,7 @@ class HtmlDialogUIDelegate;
class InfoBubbleDelegate;
class Profile;
class TabContents;
+class TemplateURL;
namespace gfx {
class Rect;
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 420b308..04d9988 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1075,7 +1075,7 @@ bool BrowserView::IsLabelForCommandIdDynamic(int command_id) const {
return command_id == IDC_RESTORE_TAB;
}
-std::wstring BrowserView::GetLabelForCommandId(int command_id) const {
+string16 BrowserView::GetLabelForCommandId(int command_id) const {
DCHECK(command_id == IDC_RESTORE_TAB);
int string_id = IDS_RESTORE_TAB;
@@ -1084,7 +1084,7 @@ std::wstring BrowserView::GetLabelForCommandId(int command_id) const {
if (trs && trs->entries().front()->type == TabRestoreService::WINDOW)
string_id = IDS_RESTORE_WINDOW;
}
- return l10n_util::GetString(string_id);
+ return l10n_util::GetStringUTF16(string_id);
}
void BrowserView::ExecuteCommand(int command_id) {
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index c21b2a2..fd321ce 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -264,7 +264,7 @@ class BrowserView : public BrowserWindow,
virtual bool GetAcceleratorForCommandId(int command_id,
views::Accelerator* accelerator);
virtual bool IsLabelForCommandIdDynamic(int command_id) const;
- virtual std::wstring GetLabelForCommandId(int command_id) const;
+ virtual string16 GetLabelForCommandId(int command_id) const;
virtual void ExecuteCommand(int command_id);
// Overridden from views::WindowDelegate:
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 7fa99de..a4d57ff 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -135,7 +135,7 @@ void InfoBubble::Init(views::Window* parent,
#if defined(OS_WIN)
WidgetWin::Init(parent->GetNativeWindow(), bounds);
#else
- WidgetGtk::Init(GTK_WIDGET(parent->GetNativeWindow()), bounds, true);
+ WidgetGtk::Init(GTK_WIDGET(parent->GetNativeWindow()), bounds);
#endif
SetContentsView(content_view_);
// The preferred size may differ when parented. Ask for the bounds again
diff --git a/chrome/browser/views/tab_contents/render_view_context_menu_win.cc b/chrome/browser/views/tab_contents/render_view_context_menu_win.cc
index 8f31491..63bbca6 100644
--- a/chrome/browser/views/tab_contents/render_view_context_menu_win.cc
+++ b/chrome/browser/views/tab_contents/render_view_context_menu_win.cc
@@ -91,21 +91,20 @@ void RenderViewContextMenuWin::AppendMenuItem(int id) {
}
void RenderViewContextMenuWin::AppendMenuItem(int id,
- const std::wstring& label) {
+ const string16& label) {
current_radio_group_id_ = -1;
GetTargetModel()->AddItem(id, label);
}
void RenderViewContextMenuWin::AppendRadioMenuItem(int id,
- const std::wstring& label) {
+ const string16& label) {
if (current_radio_group_id_ < 0)
current_radio_group_id_ = id;
GetTargetModel()->AddRadioItem(id, label, current_radio_group_id_);
}
-void RenderViewContextMenuWin::AppendCheckboxMenuItem(
- int id,
- const std::wstring& label) {
+void RenderViewContextMenuWin::AppendCheckboxMenuItem(int id,
+ const string16& label) {
current_radio_group_id_ = -1;
GetTargetModel()->AddCheckItem(id, label);
}
@@ -115,7 +114,7 @@ void RenderViewContextMenuWin::AppendSeparator() {
GetTargetModel()->AddSeparator();
}
-void RenderViewContextMenuWin::StartSubMenu(int id, const std::wstring& label) {
+void RenderViewContextMenuWin::StartSubMenu(int id, const string16& label) {
if (sub_menu_contents_) {
NOTREACHED() << "nested submenus not supported yet";
return;
diff --git a/chrome/browser/views/tab_contents/render_view_context_menu_win.h b/chrome/browser/views/tab_contents/render_view_context_menu_win.h
index e897e7e..4ff68b9 100644
--- a/chrome/browser/views/tab_contents/render_view_context_menu_win.h
+++ b/chrome/browser/views/tab_contents/render_view_context_menu_win.h
@@ -36,11 +36,11 @@ class RenderViewContextMenuWin : public RenderViewContextMenu,
// RenderViewContextMenu implementation --------------------------------------
virtual void DoInit();
virtual void AppendMenuItem(int id);
- virtual void AppendMenuItem(int id, const std::wstring& label);
- virtual void AppendRadioMenuItem(int id, const std::wstring& label);
- virtual void AppendCheckboxMenuItem(int id, const std::wstring& label);
+ virtual void AppendMenuItem(int id, const string16& label);
+ virtual void AppendRadioMenuItem(int id, const string16& label);
+ virtual void AppendCheckboxMenuItem(int id, const string16& label);
virtual void AppendSeparator();
- virtual void StartSubMenu(int id, const std::wstring& label);
+ virtual void StartSubMenu(int id, const string16& label);
virtual void FinishSubMenu();
private:
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
index a4d8ad6..32fedaa 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -100,7 +100,7 @@ TabContentsViewGtk::~TabContentsViewGtk() {
void TabContentsViewGtk::CreateView() {
set_delete_on_destroy(false);
- WidgetGtk::Init(NULL, gfx::Rect(), false);
+ WidgetGtk::Init(NULL, gfx::Rect());
}
RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget(
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 430da1c..d92a876 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -106,12 +106,12 @@ void EncodingMenuModel::Build() {
AddSeparator();
} else {
if (id == IDC_ENCODING_AUTO_DETECT) {
- AddCheckItem(id, label);
+ AddCheckItem(id, WideToUTF16Hack(label));
} else {
// Use the id of the first radio command as the id of the group.
if (group_id <= 0)
group_id = id;
- AddRadioItem(id, label, group_id);
+ AddRadioItem(id, WideToUTF16Hack(label), group_id);
}
}
}
@@ -290,7 +290,7 @@ void ToolbarView::OnGetProfilesDone(
for (int i = IDC_NEW_WINDOW_PROFILE_0;
(i <= IDC_NEW_WINDOW_PROFILE_LAST) && (iter != profiles.end());
++i, ++iter)
- profiles_menu_contents_->AddItem(i, *iter);
+ profiles_menu_contents_->AddItem(i, WideToUTF16Hack(*iter));
// If there are more profiles then show "Other" link.
if (iter != profiles.end()) {
@@ -1087,13 +1087,13 @@ void ToolbarView::CreateAppMenu() {
IDS_IMPORT_SETTINGS);
app_menu_contents_->AddSeparator();
app_menu_contents_->AddItem(IDC_OPTIONS,
- l10n_util::GetStringF(
+ l10n_util::GetStringFUTF16(
IDS_OPTIONS,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
app_menu_contents_->AddItem(IDC_ABOUT,
- l10n_util::GetStringF(
+ l10n_util::GetStringFUTF16(
IDS_ABOUT,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE);
app_menu_contents_->AddSeparator();
app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT);
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 5c88240..a153017 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2020,6 +2020,7 @@
['exclude', '^browser/bookmarks/bookmark_context_menu_gtk.cc'],
# Other excluded stuff.
+ ['exclude', '^browser/browser_theme_provider_gtk.cc'],
['exclude', '^browser/extensions/external_registry_extension_provider_win.cc'],
['exclude', '^browser/tab_contents/tab_contents_view_gtk.cc'],
['exclude', '^browser/tab_contents/tab_contents_view_gtk.h'],