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

Side by Side Diff: chrome/browser/views/tabs/tab_strip.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/web_contents.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/views/tabs/tab_strip.h" 5 #include "chrome/browser/views/tabs/tab_strip.h"
6 6
7 #include "base/gfx/size.h" 7 #include "base/gfx/size.h"
8 #include "chrome/app/theme/theme_resources.h" 8 #include "chrome/app/theme/theme_resources.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/tab_contents.h" 10 #include "chrome/browser/tab_contents.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 std::wstring title; 701 std::wstring title;
702 if (!event.GetData().GetURLAndTitle(&url, &title) || !url.is_valid()) 702 if (!event.GetData().GetURLAndTitle(&url, &title) || !url.is_valid())
703 return DragDropTypes::DRAG_NONE; 703 return DragDropTypes::DRAG_NONE;
704 704
705 if (drop_before) { 705 if (drop_before) {
706 UserMetrics::RecordAction(L"Tab_DropURLBetweenTabs", model_->profile()); 706 UserMetrics::RecordAction(L"Tab_DropURLBetweenTabs", model_->profile());
707 707
708 // Insert a new tab. 708 // Insert a new tab.
709 TabContents* contents = 709 TabContents* contents =
710 model_->delegate()->CreateTabContentsForURL( 710 model_->delegate()->CreateTabContentsForURL(
711 url, model_->profile(), PageTransition::TYPED, false, NULL); 711 url, GURL(), model_->profile(), PageTransition::TYPED, false,
712 NULL);
712 model_->AddTabContents(contents, drop_index, PageTransition::GENERATED, 713 model_->AddTabContents(contents, drop_index, PageTransition::GENERATED,
713 true); 714 true);
714 } else { 715 } else {
715 UserMetrics::RecordAction(L"Tab_DropURLOnTab", model_->profile()); 716 UserMetrics::RecordAction(L"Tab_DropURLOnTab", model_->profile());
716 717
717 model_->GetTabContentsAt(drop_index)->controller()-> 718 model_->GetTabContentsAt(drop_index)->controller()->
718 LoadURL(url, PageTransition::GENERATED); 719 LoadURL(url, GURL(), PageTransition::GENERATED);
719 model_->SelectTabContentsAt(drop_index, true); 720 model_->SelectTabContentsAt(drop_index, true);
720 } 721 }
721 722
722 return GetDropEffect(event); 723 return GetDropEffect(event);
723 } 724 }
724 725
725 bool TabStrip::GetAccessibleRole(VARIANT* role) { 726 bool TabStrip::GetAccessibleRole(VARIANT* role) {
726 DCHECK(role); 727 DCHECK(role);
727 728
728 role->vt = VT_I4; 729 role->vt = VT_I4;
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 return last_tab->x() + last_tab->width(); 1558 return last_tab->x() + last_tab->width();
1558 } 1559 }
1559 1560
1560 bool TabStrip::IsPointInTab(Tab* tab, 1561 bool TabStrip::IsPointInTab(Tab* tab,
1561 const gfx::Point& point_in_tabstrip_coords) { 1562 const gfx::Point& point_in_tabstrip_coords) {
1562 gfx::Point point_in_tab_coords(point_in_tabstrip_coords); 1563 gfx::Point point_in_tab_coords(point_in_tabstrip_coords);
1563 View::ConvertPointToView(this, tab, &point_in_tab_coords); 1564 View::ConvertPointToView(this, tab, &point_in_tab_coords);
1564 return tab->HitTest(point_in_tab_coords); 1565 return tab->HitTest(point_in_tab_coords);
1565 } 1566 }
1566 1567
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698