OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 DCHECK_NE(GetDragOperationsForView(sender, press_pt), | 1650 DCHECK_NE(GetDragOperationsForView(sender, press_pt), |
1651 ui::DragDropTypes::DRAG_NONE); | 1651 ui::DragDropTypes::DRAG_NONE); |
1652 | 1652 |
1653 WebContents* web_contents = GetWebContents(); | 1653 WebContents* web_contents = GetWebContents(); |
1654 FaviconTabHelper* favicon_tab_helper = | 1654 FaviconTabHelper* favicon_tab_helper = |
1655 FaviconTabHelper::FromWebContents(web_contents); | 1655 FaviconTabHelper::FromWebContents(web_contents); |
1656 gfx::ImageSkia favicon = favicon_tab_helper->GetFavicon().AsImageSkia(); | 1656 gfx::ImageSkia favicon = favicon_tab_helper->GetFavicon().AsImageSkia(); |
1657 button_drag_utils::SetURLAndDragImage(web_contents->GetURL(), | 1657 button_drag_utils::SetURLAndDragImage(web_contents->GetURL(), |
1658 web_contents->GetTitle(), | 1658 web_contents->GetTitle(), |
1659 favicon, | 1659 favicon, |
| 1660 NULL, |
1660 data, | 1661 data, |
1661 sender->GetWidget()); | 1662 sender->GetWidget()); |
1662 } | 1663 } |
1663 | 1664 |
1664 int LocationBarView::GetDragOperationsForView(views::View* sender, | 1665 int LocationBarView::GetDragOperationsForView(views::View* sender, |
1665 const gfx::Point& p) { | 1666 const gfx::Point& p) { |
1666 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) || | 1667 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) || |
1667 (sender == origin_chip_view_)); | 1668 (sender == origin_chip_view_)); |
1668 WebContents* web_contents = delegate_->GetWebContents(); | 1669 WebContents* web_contents = delegate_->GetWebContents(); |
1669 return (web_contents && web_contents->GetURL().is_valid() && | 1670 return (web_contents && web_contents->GetURL().is_valid() && |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1807 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
1807 const SearchModel::State& new_state) { | 1808 const SearchModel::State& new_state) { |
1808 const bool visible = !GetToolbarModel()->input_in_progress() && | 1809 const bool visible = !GetToolbarModel()->input_in_progress() && |
1809 new_state.voice_search_supported; | 1810 new_state.voice_search_supported; |
1810 if (mic_search_view_->visible() != visible) { | 1811 if (mic_search_view_->visible() != visible) { |
1811 mic_search_view_->SetVisible(visible); | 1812 mic_search_view_->SetVisible(visible); |
1812 Layout(); | 1813 Layout(); |
1813 } | 1814 } |
1814 } | 1815 } |
1815 | 1816 |
OLD | NEW |