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_
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
{
24 ActiveTabsNameURLPairVector activeTabPairsVector_
;
27 - (id
)initWithParentWindow
:(NSWindow
*)parentWindow
28 profile
:(Profile
*)profile
29 parent
:(const BookmarkNode
*)parent
31 title
:(const base::string16
&)title
32 configuration
:(BookmarkEditor::Configuration
)configuration
;
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
;
47 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_