| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 return 0; | 184 return 0; |
| 185 } | 185 } |
| 186 | 186 |
| 187 void ExternalTabContainer::OpenURLFromTab(TabContents* source, | 187 void ExternalTabContainer::OpenURLFromTab(TabContents* source, |
| 188 const GURL& url, | 188 const GURL& url, |
| 189 const GURL& referrer, | 189 const GURL& referrer, |
| 190 WindowOpenDisposition disposition, | 190 WindowOpenDisposition disposition, |
| 191 PageTransition::Type transition) { | 191 PageTransition::Type transition) { |
| 192 switch (disposition) { | 192 switch (disposition) { |
| 193 case CURRENT_TAB: | 193 case CURRENT_TAB: |
| 194 case SINGLETON_TAB: |
| 194 case NEW_FOREGROUND_TAB: | 195 case NEW_FOREGROUND_TAB: |
| 195 case NEW_BACKGROUND_TAB: | 196 case NEW_BACKGROUND_TAB: |
| 196 case NEW_WINDOW: | 197 case NEW_WINDOW: |
| 197 if (automation_) { | 198 if (automation_) { |
| 198 automation_->Send(new AutomationMsg_OpenURL(0, url, disposition)); | 199 automation_->Send(new AutomationMsg_OpenURL(0, url, disposition)); |
| 199 } | 200 } |
| 200 break; | 201 break; |
| 201 default: | 202 default: |
| 202 break; | 203 break; |
| 203 } | 204 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 if (!::IsWindow(parent_window)) { | 418 if (!::IsWindow(parent_window)) { |
| 418 return NULL; | 419 return NULL; |
| 419 } | 420 } |
| 420 if (!IsExternalTabContainer(parent_window)) { | 421 if (!IsExternalTabContainer(parent_window)) { |
| 421 return NULL; | 422 return NULL; |
| 422 } | 423 } |
| 423 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( | 424 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( |
| 424 GetProp(parent_window, kWindowObjectKey)); | 425 GetProp(parent_window, kWindowObjectKey)); |
| 425 return container; | 426 return container; |
| 426 } | 427 } |
| OLD | NEW |