| 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/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 // bookmark. | 763 // bookmark. |
| 764 if (profile_ && profile_->GetBookmarkModel()) { | 764 if (profile_ && profile_->GetBookmarkModel()) { |
| 765 BookmarkNode* node = profile_->GetBookmarkModel()-> | 765 BookmarkNode* node = profile_->GetBookmarkModel()-> |
| 766 GetMostRecentlyAddedNodeForURL(tab_->GetURL()); | 766 GetMostRecentlyAddedNodeForURL(tab_->GetURL()); |
| 767 if (node) { | 767 if (node) { |
| 768 BookmarkDragData bookmark_data(node); | 768 BookmarkDragData bookmark_data(node); |
| 769 bookmark_data.Write(profile_, data); | 769 bookmark_data.Write(profile_, data); |
| 770 } | 770 } |
| 771 } | 771 } |
| 772 | 772 |
| 773 drag_utils::SetURLAndDragImage(tab_->GetURL(), tab_->GetTitle(), | 773 drag_utils::SetURLAndDragImage(tab_->GetURL(), |
| 774 UTF16ToWideHack(tab_->GetTitle()), |
| 774 tab_->GetFavIcon(), data); | 775 tab_->GetFavIcon(), data); |
| 775 } | 776 } |
| 776 | 777 |
| 777 TabContents* BrowserToolbarView::GetTabContents() { | 778 TabContents* BrowserToolbarView::GetTabContents() { |
| 778 return tab_; | 779 return tab_; |
| 779 } | 780 } |
| 780 | 781 |
| 781 void BrowserToolbarView::EnabledStateChangedForCommand(int id, bool enabled) { | 782 void BrowserToolbarView::EnabledStateChangedForCommand(int id, bool enabled) { |
| 782 views::Button* button = NULL; | 783 views::Button* button = NULL; |
| 783 switch (id) { | 784 switch (id) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 *accel = views::Accelerator(L'C', false, true, false); | 837 *accel = views::Accelerator(L'C', false, true, false); |
| 837 return true; | 838 return true; |
| 838 case IDC_PASTE: | 839 case IDC_PASTE: |
| 839 *accel = views::Accelerator(L'V', false, true, false); | 840 *accel = views::Accelerator(L'V', false, true, false); |
| 840 return true; | 841 return true; |
| 841 } | 842 } |
| 842 // Else, we retrieve the accelerator information from the frame. | 843 // Else, we retrieve the accelerator information from the frame. |
| 843 return GetWidget()->GetAccelerator(id, accel); | 844 return GetWidget()->GetAccelerator(id, accel); |
| 844 } | 845 } |
| 845 | 846 |
| OLD | NEW |