OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/string16.h" |
12 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
13 #include "base/string16.h" | |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
16 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 17 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
17 #include "chrome/browser/bookmarks/bookmark_model.h" | |
18 #if defined(OS_MACOSX) | 18 #if defined(OS_MACOSX) |
19 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 19 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
20 #endif | 20 #endif |
21 #include "chrome/browser/browser_list.h" | 21 #include "chrome/browser/browser_list.h" |
22 #include "chrome/browser/browser_window.h" | 22 #include "chrome/browser/browser_window.h" |
23 #include "chrome/browser/history/query_parser.h" | 23 #include "chrome/browser/history/query_parser.h" |
24 #include "chrome/browser/platform_util.h" | 24 #include "chrome/browser/platform_util.h" |
25 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/tab_contents/page_navigator.h" | 27 #include "chrome/browser/tab_contents/page_navigator.h" |
28 #include "chrome/browser/tab_contents/tab_contents.h" | 28 #include "chrome/browser/tab_contents/tab_contents.h" |
29 #include "chrome/browser/ui/browser.h" | 29 #include "chrome/browser/ui/browser.h" |
30 #include "chrome/common/notification_service.h" | 30 #include "chrome/common/notification_service.h" |
31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
32 #include "grit/app_strings.h" | 32 #include "grit/app_strings.h" |
33 #include "grit/chromium_strings.h" | 33 #include "grit/chromium_strings.h" |
34 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
35 #include "net/base/net_util.h" | 35 #include "net/base/net_util.h" |
36 #include "ui/base/dragdrop/drag_drop_types.h" | 36 #include "ui/base/dragdrop/drag_drop_types.h" |
37 #include "ui/base/models/tree_node_iterator.h" | 37 #include "ui/base/models/tree_node_iterator.h" |
38 #include "views/event.h" | 38 #include "views/event.h" |
39 | 39 |
40 #if defined(TOOLKIT_VIEWS) | 40 #if defined(TOOLKIT_VIEWS) |
41 #include "ui/base/dragdrop/os_exchange_data.h" | 41 #include "ui/base/dragdrop/os_exchange_data.h" |
42 #include "views/drag_utils.h" | 42 #include "views/drag_utils.h" |
43 #include "views/widget/root_view.h" | 43 #include "views/widget/root_view.h" |
44 #include "views/widget/widget.h" | 44 #include "views/widget/widget.h" |
45 #elif defined(TOOLKIT_GTK) | 45 #elif defined(TOOLKIT_GTK) |
46 #include "chrome/browser/gtk/custom_drag.h" | 46 #include "chrome/browser/ui/gtk/custom_drag.h" |
47 #endif | 47 #endif |
48 | 48 |
49 using base::Time; | 49 using base::Time; |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 // A PageNavigator implementation that creates a new Browser. This is used when | 53 // A PageNavigator implementation that creates a new Browser. This is used when |
54 // opening a url and there is no Browser open. The Browser is created the first | 54 // opening a url and there is no Browser open. The Browser is created the first |
55 // time the PageNavigator method is invoked. | 55 // time the PageNavigator method is invoked. |
56 class NewBrowserPageNavigator : public PageNavigator { | 56 class NewBrowserPageNavigator : public PageNavigator { |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 return true; | 662 return true; |
663 | 663 |
664 for (int i = 0; i < node->GetChildCount(); ++i) { | 664 for (int i = 0; i < node->GetChildCount(); ++i) { |
665 if (NodeHasURLs(node->GetChild(i))) | 665 if (NodeHasURLs(node->GetChild(i))) |
666 return true; | 666 return true; |
667 } | 667 } |
668 return false; | 668 return false; |
669 } | 669 } |
670 | 670 |
671 } // namespace bookmark_utils | 671 } // namespace bookmark_utils |
OLD | NEW |