Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/browser/external_tab_container.cc

Issue 60062: Only create one downloads tab per window. If there is already a Downloads... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | webkit/glue/window_open_disposition.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | webkit/glue/window_open_disposition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698