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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 gfx::Rect bounds(NSRectToCGRect([field_ frame])); 585 gfx::Rect bounds(NSRectToCGRect([field_ frame]));
586 instant_service->OnOmniboxStartMarginChanged(bounds.x()); 586 instant_service->OnOmniboxStartMarginChanged(bounds.x());
587 } 587 }
588 } 588 }
589 589
590 void LocationBarViewMac::OnSetFocus() { 590 void LocationBarViewMac::OnSetFocus() {
591 // Update the keyword and search hint states. 591 // Update the keyword and search hint states.
592 OnChanged(); 592 OnChanged();
593 } 593 }
594 594
595 void LocationBarViewMac::ShowURL() {
596 omnibox_view_->ShowURL();
597 }
598
599 void LocationBarViewMac::HideURLAndShowOriginChip() {
groby-ooo-7-16 2014/03/20 23:38:53 Since the counterpart is just ShowURL, maybe we sh
Justin Donnelly 2014/03/21 21:15:57 Done.
600 omnibox_view_->HideURL();
601 }
602
595 InstantController* LocationBarViewMac::GetInstant() { 603 InstantController* LocationBarViewMac::GetInstant() {
596 return browser_->instant_controller() ? 604 return browser_->instant_controller() ?
597 browser_->instant_controller()->instant() : NULL; 605 browser_->instant_controller()->instant() : NULL;
598 } 606 }
599 607
600 WebContents* LocationBarViewMac::GetWebContents() { 608 WebContents* LocationBarViewMac::GetWebContents() {
601 return browser_->tab_strip_model()->GetActiveWebContents(); 609 return browser_->tab_strip_model()->GetActiveWebContents();
602 } 610 }
603 611
604 ToolbarModel* LocationBarViewMac::GetToolbarModel() { 612 ToolbarModel* LocationBarViewMac::GetToolbarModel() {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 806 }
799 807
800 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { 808 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() {
801 bool is_visible = !GetToolbarModel()->input_in_progress() && 809 bool is_visible = !GetToolbarModel()->input_in_progress() &&
802 browser_->search_model()->voice_search_supported(); 810 browser_->search_model()->voice_search_supported();
803 if (mic_search_decoration_->IsVisible() == is_visible) 811 if (mic_search_decoration_->IsVisible() == is_visible)
804 return false; 812 return false;
805 mic_search_decoration_->SetVisible(is_visible); 813 mic_search_decoration_->SetVisible(is_visible);
806 return true; 814 return true;
807 } 815 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698