| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "ui/base/clipboard/clipboard.h" | 29 #include "ui/base/clipboard/clipboard.h" |
| 30 #include "ui/events/platform/platform_event_source.h" | 30 #include "ui/events/platform/platform_event_source.h" |
| 31 #include "ui/views/controls/menu/menu_item_view.h" | 31 #include "ui/views/controls/menu/menu_item_view.h" |
| 32 | 32 |
| 33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 34 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 using base::ASCIIToUTF16; | 37 using base::ASCIIToUTF16; |
| 38 using bookmarks::BookmarkModel; | 38 using bookmarks::BookmarkModel; |
| 39 using bookmarks::BookmarkNode; |
| 39 using content::BrowserThread; | 40 using content::BrowserThread; |
| 40 using content::OpenURLParams; | 41 using content::OpenURLParams; |
| 41 using content::PageNavigator; | 42 using content::PageNavigator; |
| 42 using content::WebContents; | 43 using content::WebContents; |
| 43 | 44 |
| 44 namespace { | 45 namespace { |
| 45 | 46 |
| 46 // PageNavigator implementation that records the URL. | 47 // PageNavigator implementation that records the URL. |
| 47 class TestingPageNavigator : public PageNavigator { | 48 class TestingPageNavigator : public PageNavigator { |
| 48 public: | 49 public: |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 controller.reset(new BookmarkContextMenu( | 378 controller.reset(new BookmarkContextMenu( |
| 378 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); | 379 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); |
| 379 EXPECT_TRUE(controller->IsCommandVisible(IDC_BOOKMARK_BAR_NEW_FOLDER)); | 380 EXPECT_TRUE(controller->IsCommandVisible(IDC_BOOKMARK_BAR_NEW_FOLDER)); |
| 380 EXPECT_TRUE( | 381 EXPECT_TRUE( |
| 381 controller->IsCommandVisible(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS)); | 382 controller->IsCommandVisible(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS)); |
| 382 menu = controller->menu(); | 383 menu = controller->menu(); |
| 383 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_NEW_FOLDER)->visible()); | 384 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_NEW_FOLDER)->visible()); |
| 384 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS) | 385 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS) |
| 385 ->visible()); | 386 ->visible()); |
| 386 } | 387 } |
| OLD | NEW |