- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / bookmarks / bookmark_all_tabs_controller.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_
7
8 #include <utility>
9 #include <vector>
10
11 #include "base/strings/string16.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h"
13
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<string16, GURL> ActiveTabNameURLPair;
17 typedef std::vector<ActiveTabNameURLPair> ActiveTabsNameURLPairVector;
18
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_;
25 }
26
27 - (id)initWithParentWindow:(NSWindow*)parentWindow
28                    profile:(Profile*)profile
29                     parent:(const BookmarkNode*)parent
30                        url:(const GURL&)url
31                      title:(const string16&)title
32              configuration:(BookmarkEditor::Configuration)configuration;
33
34 @end
35
36 @interface BookmarkAllTabsController(TestingAPI)
37
38 // Initializes the list of all tab names and URLs.  Overridden by unit test
39 // to provide canned test data.
40 - (void)UpdateActiveTabPairs;
41
42 // Provides testing access to tab pairs list.
43 - (ActiveTabsNameURLPairVector*)activeTabPairsVector;
44
45 @end
46
47 #endif  // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_ALL_TABS_CONTROLLER_H_