summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/back_forward_menu_model_views.cc (renamed from chrome/browser/back_forward_menu_model_win.cc)26
-rw-r--r--chrome/browser/back_forward_menu_model_views.h (renamed from chrome/browser/back_forward_menu_model_win.h)14
-rw-r--r--chrome/browser/browser.vcproj4
-rw-r--r--chrome/browser/views/toolbar_view.cc5
-rw-r--r--chrome/browser/views/toolbar_view.h6
-rw-r--r--chrome/chrome.gyp4
6 files changed, 30 insertions, 29 deletions
diff --git a/chrome/browser/back_forward_menu_model_win.cc b/chrome/browser/back_forward_menu_model_views.cc
index 5131326..f509274 100644
--- a/chrome/browser/back_forward_menu_model_win.cc
+++ b/chrome/browser/back_forward_menu_model_views.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/back_forward_menu_model_win.h"
+#include "chrome/browser/back_forward_menu_model_views.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -11,20 +11,20 @@
// static
BackForwardMenuModel* BackForwardMenuModel::Create(Browser* browser,
ModelType model_type) {
- return new BackForwardMenuModelWin(browser, model_type);
+ return new BackForwardMenuModelViews(browser, model_type);
}
-BackForwardMenuModelWin::BackForwardMenuModelWin(Browser* browser,
- ModelType model_type) {
+BackForwardMenuModelViews::BackForwardMenuModelViews(Browser* browser,
+ ModelType model_type) {
browser_ = browser;
model_type_ = model_type;
}
-std::wstring BackForwardMenuModelWin::GetLabel(int menu_id) const {
+std::wstring BackForwardMenuModelViews::GetLabel(int menu_id) const {
return GetItemLabel(menu_id);
}
-const SkBitmap& BackForwardMenuModelWin::GetIcon(int menu_id) const {
+const SkBitmap& BackForwardMenuModelViews::GetIcon(int menu_id) const {
// Return NULL if the item doesn't have an icon
if (!ItemHasIcon(menu_id))
return GetEmptyIcon();
@@ -32,31 +32,31 @@ const SkBitmap& BackForwardMenuModelWin::GetIcon(int menu_id) const {
return GetItemIcon(menu_id);
}
-bool BackForwardMenuModelWin::IsItemSeparator(int menu_id) const {
+bool BackForwardMenuModelViews::IsItemSeparator(int menu_id) const {
return IsSeparator(menu_id);
}
-bool BackForwardMenuModelWin::HasIcon(int menu_id) const {
+bool BackForwardMenuModelViews::HasIcon(int menu_id) const {
return ItemHasIcon(menu_id);
}
-bool BackForwardMenuModelWin::SupportsCommand(int menu_id) const {
+bool BackForwardMenuModelViews::SupportsCommand(int menu_id) const {
return ItemHasCommand(menu_id);
}
-bool BackForwardMenuModelWin::IsCommandEnabled(int menu_id) const {
+bool BackForwardMenuModelViews::IsCommandEnabled(int menu_id) const {
return ItemHasCommand(menu_id);
}
-void BackForwardMenuModelWin::ExecuteCommand(int menu_id) {
+void BackForwardMenuModelViews::ExecuteCommand(int menu_id) {
ExecuteCommandById(menu_id);
}
-void BackForwardMenuModelWin::MenuWillShow() {
+void BackForwardMenuModelViews::MenuWillShow() {
UserMetrics::RecordComputedAction(BuildActionName(L"Popup", -1),
browser_->profile());
}
-int BackForwardMenuModelWin::GetItemCount() const {
+int BackForwardMenuModelViews::GetItemCount() const {
return GetTotalItemCount();
}
diff --git a/chrome/browser/back_forward_menu_model_win.h b/chrome/browser/back_forward_menu_model_views.h
index ed308df..19a36ace 100644
--- a/chrome/browser/back_forward_menu_model_win.h
+++ b/chrome/browser/back_forward_menu_model_views.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_WIN_H_
-#define CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_WIN_H_
+#ifndef CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
+#define CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
#include "base/basictypes.h"
@@ -12,10 +12,10 @@
class SkBitmap;
-class BackForwardMenuModelWin : public BackForwardMenuModel,
- public views::Menu::Delegate {
+class BackForwardMenuModelViews : public BackForwardMenuModel,
+ public views::Menu::Delegate {
public:
- BackForwardMenuModelWin(Browser* browser, ModelType model_type);
+ BackForwardMenuModelViews(Browser* browser, ModelType model_type);
// Menu::Delegate
virtual std::wstring GetLabel(int menu_id) const;
@@ -29,7 +29,7 @@ class BackForwardMenuModelWin : public BackForwardMenuModel,
virtual int GetItemCount() const;
private:
- DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModelWin);
+ DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModelViews);
};
-#endif // CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_WIN_H_
+#endif // CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
diff --git a/chrome/browser/browser.vcproj b/chrome/browser/browser.vcproj
index 4ee28a7..c18a4ff 100644
--- a/chrome/browser/browser.vcproj
+++ b/chrome/browser/browser.vcproj
@@ -716,11 +716,11 @@
>
</File>
<File
- RelativePath=".\back_forward_menu_model_win.cc"
+ RelativePath=".\back_forward_menu_model_views.cc"
>
</File>
<File
- RelativePath=".\back_forward_menu_model_win.h"
+ RelativePath=".\back_forward_menu_model_views.h"
>
</File>
<File
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index fcc3955..5ab4dcd 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -15,6 +15,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/browser/back_forward_menu_model_views.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_process.h"
@@ -102,9 +103,9 @@ BrowserToolbarView::BrowserToolbarView(Browser* browser)
browser_->command_updater()->AddCommandObserver(IDC_RELOAD, this);
browser_->command_updater()->AddCommandObserver(IDC_HOME, this);
browser_->command_updater()->AddCommandObserver(IDC_STAR, this);
- back_menu_model_.reset(new BackForwardMenuModelWin(
+ back_menu_model_.reset(new BackForwardMenuModelViews(
browser, BackForwardMenuModel::BACKWARD_MENU_DELEGATE));
- forward_menu_model_.reset(new BackForwardMenuModelWin(
+ forward_menu_model_.reset(new BackForwardMenuModelViews(
browser, BackForwardMenuModel::FORWARD_MENU_DELEGATE));
if (browser->type() == Browser::TYPE_NORMAL)
display_mode_ = DISPLAYMODE_NORMAL;
diff --git a/chrome/browser/views/toolbar_view.h b/chrome/browser/views/toolbar_view.h
index 9d4edda..ba72763 100644
--- a/chrome/browser/views/toolbar_view.h
+++ b/chrome/browser/views/toolbar_view.h
@@ -9,7 +9,6 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/back_forward_menu_model_win.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/encoding_menu_controller_delegate.h"
#include "chrome/browser/user_data_manager.h"
@@ -22,6 +21,7 @@
#include "views/controls/menu/view_menu_delegate.h"
#include "views/view.h"
+class BackForwardMenuModelViews;
class Browser;
class Profile;
class ToolbarStarToggle;
@@ -171,8 +171,8 @@ class BrowserToolbarView : public views::View,
return display_mode_ == DISPLAYMODE_NORMAL;
}
- scoped_ptr<BackForwardMenuModelWin> back_menu_model_;
- scoped_ptr<BackForwardMenuModelWin> forward_menu_model_;
+ scoped_ptr<BackForwardMenuModelViews> back_menu_model_;
+ scoped_ptr<BackForwardMenuModelViews> forward_menu_model_;
// The model that contains the security level, text, icon to display...
ToolbarModel* model_;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index ba54c77..ef24b7e 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -577,8 +577,8 @@
'browser/automation/url_request_slow_download_job.h',
'browser/back_forward_menu_model.cc',
'browser/back_forward_menu_model.h',
- 'browser/back_forward_menu_model_win.cc',
- 'browser/back_forward_menu_model_win.h',
+ 'browser/back_forward_menu_model_views.cc',
+ 'browser/back_forward_menu_model_views.h',
'browser/bookmarks/bookmark_codec.cc',
'browser/bookmarks/bookmark_codec.h',
'browser/bookmarks/bookmark_context_menu_gtk.cc',