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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDirectlyToSecondWindow. Created 6 years, 6 months 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
OLDNEW
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
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,
1644 data, 1645 data,
1645 sender->GetWidget()); 1646 sender->GetWidget());
1646 } 1647 }
1647 1648
1648 int LocationBarView::GetDragOperationsForView(views::View* sender, 1649 int LocationBarView::GetDragOperationsForView(views::View* sender,
1649 const gfx::Point& p) { 1650 const gfx::Point& p) {
1650 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) || 1651 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_) ||
1651 (sender == origin_chip_view_)); 1652 (sender == origin_chip_view_));
1652 WebContents* web_contents = delegate_->GetWebContents(); 1653 WebContents* web_contents = delegate_->GetWebContents();
1653 return (web_contents && web_contents->GetURL().is_valid() && 1654 return (web_contents && web_contents->GetURL().is_valid() &&
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 void LocationBarView::ModelChanged(const SearchModel::State& old_state, 1788 void LocationBarView::ModelChanged(const SearchModel::State& old_state,
1788 const SearchModel::State& new_state) { 1789 const SearchModel::State& new_state) {
1789 const bool visible = !GetToolbarModel()->input_in_progress() && 1790 const bool visible = !GetToolbarModel()->input_in_progress() &&
1790 new_state.voice_search_supported; 1791 new_state.voice_search_supported;
1791 if (mic_search_view_->visible() != visible) { 1792 if (mic_search_view_->visible() != visible) {
1792 mic_search_view_->SetVisible(visible); 1793 mic_search_view_->SetVisible(visible);
1793 Layout(); 1794 Layout();
1794 } 1795 }
1795 } 1796 }
1796 1797
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698