Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 6814037: Fix for http://code.google.com/p/chromium-os/issues/detail?id=13899 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 2b0db48d162c9c779efa1f8dac6a950376704a63..17a1ed89f68d00fabc06414e586a91e60b64317c 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/views/info_bubble.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
@@ -192,11 +194,6 @@ void BookmarkBubbleView::Init() {
edit_button_ = new NativeButton(
this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_BOOMARK_BUBBLE_OPTIONS)));
-#if defined(TOUCH_UI)
- // TODO(saintlou): We need to disable the Edit button for touch since we are
- // missing some of the controls for the dialog that would pop up next.
- edit_button_->SetEnabled(false);
-#endif
close_button_ =
new NativeButton(this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_DONE)));
@@ -372,6 +369,21 @@ void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) {
}
void BookmarkBubbleView::ShowEditor() {
+#if defined(TOUCH_UI)
+ // Commit any edits now.
+ ApplyEdits();
sky 2011/04/08 17:48:44 Close applys the edits, so you shouldn't need to i
+
+ // Close the InfoBubble
+ Close();
+
+ // Open the Bookmark Manager
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ if (browser)
+ browser->OpenBookmarkManager();
+ else
sky 2011/04/08 17:48:44 This should be a DCHECK before 381.
+ NOTREACHED();
+
+#else
const BookmarkNode* node =
profile_->GetBookmarkModel()->GetMostRecentlyAddedNodeForURL(url_);
@@ -405,6 +417,7 @@ void BookmarkBubbleView::ShowEditor() {
BookmarkEditor::EditDetails(node),
BookmarkEditor::SHOW_TREE);
}
+#endif
}
void BookmarkBubbleView::ApplyEdits() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698