Chromium Code Reviews| 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() { |