OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/tabs/tab_strip_model.h" | 5 #include "chrome/browser/tabs/tab_strip_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
14 #include "chrome/browser/bookmarks/bookmark_model.h" | 14 #include "chrome/browser/bookmarks/bookmark_model.h" |
15 #include "chrome/browser/browser_shutdown.h" | 15 #include "chrome/browser/browser_shutdown.h" |
16 #include "chrome/browser/defaults.h" | 16 #include "chrome/browser/defaults.h" |
17 #include "chrome/browser/extensions/extensions_service.h" | 17 #include "chrome/browser/extensions/extensions_service.h" |
18 #include "chrome/browser/metrics/user_metrics.h" | 18 #include "chrome/browser/metrics/user_metrics.h" |
19 #include "chrome/browser/profile.h" | 19 #include "chrome/browser/profile.h" |
20 #include "chrome/browser/renderer_host/render_process_host.h" | 20 #include "chrome/browser/renderer_host/render_process_host.h" |
21 #include "chrome/browser/sessions/tab_restore_service.h" | 21 #include "chrome/browser/sessions/tab_restore_service.h" |
22 #include "chrome/browser/tabs/tab_strip_model_delegate.h" | 22 #include "chrome/browser/tabs/tab_strip_model_delegate.h" |
23 #include "chrome/browser/tabs/tab_strip_model_order_controller.h" | 23 #include "chrome/browser/tabs/tab_strip_model_order_controller.h" |
24 #include "chrome/browser/tab_contents_wrapper.h" | |
25 #include "chrome/browser/tab_contents/navigation_controller.h" | 24 #include "chrome/browser/tab_contents/navigation_controller.h" |
26 #include "chrome/browser/tab_contents/tab_contents.h" | 25 #include "chrome/browser/tab_contents/tab_contents.h" |
27 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 26 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
28 #include "chrome/browser/tab_contents/tab_contents_view.h" | 27 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/common/extensions/extension.h" | 30 #include "chrome/common/extensions/extension.h" |
31 #include "chrome/common/notification_service.h" | 31 #include "chrome/common/notification_service.h" |
32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 // Returns true if the specified transition is one of the types that cause the | 36 // Returns true if the specified transition is one of the types that cause the |
37 // opener relationships for the tab in which the transition occured to be | 37 // opener relationships for the tab in which the transition occured to be |
38 // forgotten. This is generally any navigation that isn't a link click (i.e. | 38 // forgotten. This is generally any navigation that isn't a link click (i.e. |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, | 1001 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, |
1002 TabMoved(moved_data->contents, index, to_position)); | 1002 TabMoved(moved_data->contents, index, to_position)); |
1003 } | 1003 } |
1004 | 1004 |
1005 // static | 1005 // static |
1006 bool TabStripModel::OpenerMatches(const TabContentsData* data, | 1006 bool TabStripModel::OpenerMatches(const TabContentsData* data, |
1007 const NavigationController* opener, | 1007 const NavigationController* opener, |
1008 bool use_group) { | 1008 bool use_group) { |
1009 return data->opener == opener || (use_group && data->group == opener); | 1009 return data->opener == opener || (use_group && data->group == opener); |
1010 } | 1010 } |
OLD | NEW |