Chromium Code Reviews

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

Issue 2779004: Don't allow drop to panels (pop-ups) in ChromeOS. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 1352 matching lines...)
1363 NotificationType::METRIC_EVENT_DURATION, 1363 NotificationType::METRIC_EVENT_DURATION,
1364 Source<TabContents>(this), 1364 Source<TabContents>(this),
1365 Details<MetricEventDurationDetails>(&details)); 1365 Details<MetricEventDurationDetails>(&details));
1366 } 1366 }
1367 1367
1368 void TabContents::OnCloseStarted() { 1368 void TabContents::OnCloseStarted() {
1369 if (tab_close_start_time_.is_null()) 1369 if (tab_close_start_time_.is_null())
1370 tab_close_start_time_ = base::TimeTicks::Now(); 1370 tab_close_start_time_ = base::TimeTicks::Now();
1371 } 1371 }
1372 1372
1373 bool TabContents::ShouldAcceptDragAndDrop() const {
1374 #if defined(OS_CHROMEOS)
1375 // ChromeOS panels (pop-ups) do not take drag-n-drop.
1376 // See http://crosbug.com/2413
1377 return delegate() && !delegate()->IsPopup(const_cast<TabContents*>(this));
1378 #else
1379 return true;
1380 #endif
1381 }
1382
1373 TabContents* TabContents::CloneAndMakePhantom() { 1383 TabContents* TabContents::CloneAndMakePhantom() {
1374 TabNavigation tab_nav; 1384 TabNavigation tab_nav;
1375 1385
1376 NavigationEntry* entry = controller().GetActiveEntry(); 1386 NavigationEntry* entry = controller().GetActiveEntry();
1377 if (extension_app_) 1387 if (extension_app_)
1378 tab_nav.set_virtual_url(extension_app_->GetFullLaunchURL()); 1388 tab_nav.set_virtual_url(extension_app_->GetFullLaunchURL());
1379 else if (entry) 1389 else if (entry)
1380 tab_nav.SetFromNavigationEntry(*entry); 1390 tab_nav.SetFromNavigationEntry(*entry);
1381 1391
1382 std::vector<TabNavigation> navigations; 1392 std::vector<TabNavigation> navigations;
(...skipping 1810 matching lines...)
3193 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3203 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3194 } 3204 }
3195 3205
3196 Profile* TabContents::GetProfileForPasswordManager() { 3206 Profile* TabContents::GetProfileForPasswordManager() {
3197 return profile(); 3207 return profile();
3198 } 3208 }
3199 3209
3200 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3210 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3201 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3211 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3202 } 3212 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/views/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine