Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / bookmarks / bookmark_all_tabs_controller.h
blobec7f4b9578677e4642171a237b4eff21cbe10f14
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_
8 #include <utility>
9 #include <vector>
11 #include "base/strings/string16.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h"
14 // A list of pairs containing the name and URL associated with each
15 // currently active tab in the active browser window.
16 typedef std::pair<base::string16, GURL> ActiveTabNameURLPair;
17 typedef std::vector<ActiveTabNameURLPair> ActiveTabsNameURLPairVector;
19 // A controller for the Bookmark All Tabs sheet which is presented upon
20 // selecting the Bookmark All Tabs... menu item shown by the contextual
21 // menu in the bookmarks bar.
22 @interface BookmarkAllTabsController : BookmarkEditorBaseController {
23 @private
24 ActiveTabsNameURLPairVector activeTabPairsVector_;
27 - (id)initWithParentWindow:(NSWindow*)parentWindow
28 profile:(Profile*)profile
29 parent:(const bookmarks::BookmarkNode*)parent
30 url:(const GURL&)url
31 title:(const base::string16&)title
32 configuration:(BookmarkEditor::Configuration)configuration;
34 @end
36 @interface BookmarkAllTabsController(TestingAPI)
38 // Initializes the list of all tab names and URLs. Overridden by unit test
39 // to provide canned test data.
40 - (void)UpdateActiveTabPairs;
42 // Provides testing access to tab pairs list.
43 - (ActiveTabsNameURLPairVector*)activeTabPairsVector;
45 @end
47 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_