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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 DCHECK_NE(GetDragOperationsForView(sender, press_pt), | 1634 DCHECK_NE(GetDragOperationsForView(sender, press_pt), |
1635 ui::DragDropTypes::DRAG_NONE); | 1635 ui::DragDropTypes::DRAG_NONE); |
1636 | 1636 |
1637 WebContents* web_contents = GetWebContents(); | 1637 WebContents* web_contents = GetWebContents(); |
1638 FaviconTabHelper* favicon_tab_helper = | 1638 FaviconTabHelper* favicon_tab_helper = |
1639 FaviconTabHelper::FromWebContents(web_contents); | 1639 FaviconTabHelper::FromWebContents(web_contents); |
1640 gfx::ImageSkia favicon = favicon_tab_helper->GetFavicon().AsImageSkia(); | 1640 gfx::ImageSkia favicon = favicon_tab_helper->GetFavicon().AsImageSkia(); |
1641 button_drag_utils::SetURLAndDragImage(web_contents->GetURL(), | 1641 button_drag_utils::SetURLAndDragImage(web_contents->GetURL(), |
1642 web_contents->GetTitle(), | 1642 web_contents->GetTitle(), |
1643 favicon, | 1643 favicon, |
1644 NULL, | |
1645 data, | 1644 data, |
1646 sender->GetWidget()); | 1645 sender->GetWidget()); |
1647 } | 1646 } |
1648 | 1647 |
1649 int LocationBarView::GetDragOperationsForView(views::View* sender, | 1648 int LocationBarView::GetDragOperationsForView(views::View* sender, |
1650 const gfx::Point& p) { | 1649 const gfx::Point& p) { |
1651 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) || | 1650 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) || |
1652 (sender == origin_chip_view_)); | 1651 (sender == origin_chip_view_)); |
1653 WebContents* web_contents = delegate_->GetWebContents(); | 1652 WebContents* web_contents = delegate_->GetWebContents(); |
1654 return (web_contents && web_contents->GetURL().is_valid() && | 1653 return (web_contents && web_contents->GetURL().is_valid() && |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1788 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1787 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
1789 const SearchModel::State& new_state) { | 1788 const SearchModel::State& new_state) { |
1790 const bool visible = !GetToolbarModel()->input_in_progress() && | 1789 const bool visible = !GetToolbarModel()->input_in_progress() && |
1791 new_state.voice_search_supported; | 1790 new_state.voice_search_supported; |
1792 if (mic_search_view_->visible() != visible) { | 1791 if (mic_search_view_->visible() != visible) { |
1793 mic_search_view_->SetVisible(visible); | 1792 mic_search_view_->SetVisible(visible); |
1794 Layout(); | 1793 Layout(); |
1795 } | 1794 } |
1796 } | 1795 } |
1797 | 1796 |
OLD | NEW |