summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 20:35:51 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 20:35:51 +0000
commitf3aa8945b8ee2f3eae5259c215ca523b71a34edc (patch)
treeb941c3cadb372eb3cda1e5faf5d23ea9278a7a59 /chrome/browser/views
parent7063140edd3040e56471003698be96509501f2c9 (diff)
downloadchromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.zip
chromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.tar.gz
chromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.tar.bz2
Linux/GTK: delete native bookmark manager code.
Views code still to be deleted; some cleanup will take place then. BUG=38908 TEST=everything keeps working as before Review URL: http://codereview.chromium.org/1753009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/bookmark_context_menu_controller_views.cc8
-rw-r--r--chrome/browser/views/bookmark_context_menu_test.cc14
-rw-r--r--chrome/browser/views/dialog_stubs_gtk.cc4
3 files changed, 10 insertions, 16 deletions
diff --git a/chrome/browser/views/bookmark_context_menu_controller_views.cc b/chrome/browser/views/bookmark_context_menu_controller_views.cc
index a6ceedc..dc7d090 100644
--- a/chrome/browser/views/bookmark_context_menu_controller_views.cc
+++ b/chrome/browser/views/bookmark_context_menu_controller_views.cc
@@ -45,7 +45,9 @@ class SelectOnCreationHandler : public BookmarkEditor::Handler {
}
virtual void NodeCreated(const BookmarkNode* new_node) {
+#if defined(OS_WIN)
BookmarkManager::SelectInTree(profile_, new_node);
+#endif
}
private:
@@ -105,12 +107,14 @@ void BookmarkContextMenuControllerViews::BuildMenu() {
delegate_->AddItem(IDS_BOOKMARK_BAR_EDIT);
}
+#if defined(OS_WIN)
if (configuration_ == BOOKMARK_MANAGER_TABLE ||
configuration_ == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration_ == BOOKMARK_MANAGER_ORGANIZE_MENU ||
configuration_ == BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER) {
delegate_->AddItem(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER);
}
+#endif
delegate_->AddSeparator();
delegate_->AddItem(IDS_CUT);
@@ -245,6 +249,7 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) {
bookmark_utils::ToggleWhenVisible(profile_);
break;
+#if defined(OS_WIN)
case IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER:
UserMetrics::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_ShowInFolder"),
@@ -257,6 +262,7 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) {
BookmarkManager::SelectInTree(profile_, selection_[0]);
break;
+#endif
case IDS_BOOKMARK_MANAGER:
UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"),
@@ -329,10 +335,12 @@ bool BookmarkContextMenuControllerViews::IsCommandEnabled(int id) const {
case IDS_BOOKMARK_BAR_REMOVE:
return !selection_.empty() && !is_root_node;
+#if defined(OS_WIN)
case IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER:
return (configuration_ == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration_ == BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER) &&
selection_.size() == 1;
+#endif
case IDS_BOOKMARK_MANAGER_SORT:
return parent_ && parent_ != model_->root_node();
diff --git a/chrome/browser/views/bookmark_context_menu_test.cc b/chrome/browser/views/bookmark_context_menu_test.cc
index aafbd42..09a56e2 100644
--- a/chrome/browser/views/bookmark_context_menu_test.cc
+++ b/chrome/browser/views/bookmark_context_menu_test.cc
@@ -144,8 +144,6 @@ TEST_F(BookmarkContextMenuTest, EmptyNodes) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -165,8 +163,6 @@ TEST_F(BookmarkContextMenuTest, SingleURL) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -187,8 +183,6 @@ TEST_F(BookmarkContextMenuTest, MultipleURLs) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -208,8 +202,6 @@ TEST_F(BookmarkContextMenuTest, SingleFolder) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -230,8 +222,6 @@ TEST_F(BookmarkContextMenuTest, MultipleEmptyFolders) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -252,8 +242,6 @@ TEST_F(BookmarkContextMenuTest, MultipleFoldersWithURLs) {
controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -295,8 +283,6 @@ TEST_F(BookmarkContextMenuTest, EmptyNodesNullParent) {
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_FALSE(controller.IsCommandEnabled(IDS_BOOKMARK_BAR_REMOVE));
EXPECT_FALSE(
- controller.IsCommandEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
- EXPECT_FALSE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_FALSE(
controller.IsCommandEnabled(IDS_BOOMARK_BAR_NEW_FOLDER));
diff --git a/chrome/browser/views/dialog_stubs_gtk.cc b/chrome/browser/views/dialog_stubs_gtk.cc
index ee7d7bb..f59421a 100644
--- a/chrome/browser/views/dialog_stubs_gtk.cc
+++ b/chrome/browser/views/dialog_stubs_gtk.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "chrome/browser/gtk/about_chrome_dialog.h"
#include "chrome/browser/fonts_languages_window.h"
-#include "chrome/browser/gtk/bookmark_manager_gtk.h"
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
#include "chrome/browser/gtk/edit_search_engine_dialog.h"
#include "chrome/browser/gtk/keyword_editor_view.h"
@@ -42,7 +41,8 @@ void ShowImporterView(views::Widget* parent, Profile* profile) {
}
void ShowBookmarkManagerView(Profile* profile) {
- BookmarkManagerGtk::Show(profile);
+ // TODO(viettrungluu): remove this function (crbug.com/38908)
+ NOTIMPLEMENTED();
}
void ShowPasswordsExceptionsWindowView(Profile* profile) {