| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/external_tab_container.h" | 5 #include "chrome/browser/external_tab_container.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/win_util.h" | 8 #include "base/win_util.h" |
| 9 #include "chrome/browser/automation/automation_provider.h" | 9 #include "chrome/browser/automation/automation_provider.h" |
| 10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 return 0; | 129 return 0; |
| 130 } | 130 } |
| 131 | 131 |
| 132 // TODO(sanjeevr): The implementation of the TabContentsDelegate interface | 132 // TODO(sanjeevr): The implementation of the TabContentsDelegate interface |
| 133 // needs to be fully fleshed out based on the requirements of the | 133 // needs to be fully fleshed out based on the requirements of the |
| 134 // "Chrome tab in external browser" feature. | 134 // "Chrome tab in external browser" feature. |
| 135 | 135 |
| 136 void ExternalTabContainer::OpenURLFromTab(TabContents* source, | 136 void ExternalTabContainer::OpenURLFromTab(TabContents* source, |
| 137 const GURL& url, | 137 const GURL& url, |
| 138 const GURL& referrer, |
| 138 WindowOpenDisposition disposition, | 139 WindowOpenDisposition disposition, |
| 139 PageTransition::Type transition) { | 140 PageTransition::Type transition) { |
| 140 switch (disposition) { | 141 switch (disposition) { |
| 141 case CURRENT_TAB: | 142 case CURRENT_TAB: |
| 142 case NEW_FOREGROUND_TAB: | 143 case NEW_FOREGROUND_TAB: |
| 143 case NEW_BACKGROUND_TAB: | 144 case NEW_BACKGROUND_TAB: |
| 144 case NEW_WINDOW: | 145 case NEW_WINDOW: |
| 145 if (automation_) { | 146 if (automation_) { |
| 146 automation_->Send(new AutomationMsg_OpenURL(0, url, disposition)); | 147 automation_->Send(new AutomationMsg_OpenURL(0, url, disposition)); |
| 147 } | 148 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 return NULL; | 330 return NULL; |
| 330 } | 331 } |
| 331 if (!IsExternalTabContainer(parent_window)) { | 332 if (!IsExternalTabContainer(parent_window)) { |
| 332 return NULL; | 333 return NULL; |
| 333 } | 334 } |
| 334 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( | 335 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( |
| 335 GetProp(parent_window, kWindowObjectKey)); | 336 GetProp(parent_window, kWindowObjectKey)); |
| 336 return container; | 337 return container; |
| 337 } | 338 } |
| 338 | 339 |
| OLD | NEW |