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/ui/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
9 #include "chrome/browser/browser_url_handler.h" | 9 #include "chrome/browser/browser_url_handler.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
11 #include "chrome/browser/location_bar.h" | |
12 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
13 #include "chrome/browser/renderer_host/site_instance.h" | 12 #include "chrome/browser/renderer_host/site_instance.h" |
14 #include "chrome/browser/status_bubble.h" | |
15 #include "chrome/browser/tabs/tab_strip_model.h" | 13 #include "chrome/browser/tabs/tab_strip_model.h" |
16 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
17 #include "chrome/browser/tab_contents_wrapper.h" | |
18 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/status_bubble.h" |
| 17 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Returns the SiteInstance for |source_contents| if it represents the same | 24 // Returns the SiteInstance for |source_contents| if it represents the same |
25 // website as |url|, or NULL otherwise. |source_contents| cannot be NULL. | 25 // website as |url|, or NULL otherwise. |source_contents| cannot be NULL. |
26 SiteInstance* GetSiteInstance(TabContents* source_contents, const GURL& url) { | 26 SiteInstance* GetSiteInstance(TabContents* source_contents, const GURL& url) { |
27 if (!source_contents) | 27 if (!source_contents) |
28 return NULL; | 28 return NULL; |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 params->transition, | 468 params->transition, |
469 params->tabstrip_add_types); | 469 params->tabstrip_add_types); |
470 // Now that the |params->target_contents| is safely owned by the target | 470 // Now that the |params->target_contents| is safely owned by the target |
471 // Browser's TabStripModel, we can release ownership. | 471 // Browser's TabStripModel, we can release ownership. |
472 target_contents_owner.ReleaseOwnership(); | 472 target_contents_owner.ReleaseOwnership(); |
473 } | 473 } |
474 } | 474 } |
475 } | 475 } |
476 | 476 |
477 } // namespace browser | 477 } // namespace browser |
OLD | NEW |