diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 19:36:30 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 19:36:30 +0000 |
commit | b312914ec2304ca347876ec1aefdbcd4717ea27c (patch) | |
tree | 7f844da98b63887eebdc2f5a69826af60ac8299f | |
parent | b5c006ad41da260960118bf25a8091697e180a0f (diff) | |
download | chromium_src-b312914ec2304ca347876ec1aefdbcd4717ea27c.zip chromium_src-b312914ec2304ca347876ec1aefdbcd4717ea27c.tar.gz chromium_src-b312914ec2304ca347876ec1aefdbcd4717ea27c.tar.bz2 |
Mac: send location bar frame to instant
With this CL we now send the lcoation bar's frame to the instant
controller. This allows the instant controller to align the instant
overlay with the edge of location bar.
BUG=178911
TBR=shess
Review URL: https://chromiumcodereview.appspot.com/12393019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185768 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/instant/instant_extended_browsertest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/instant/instant_extended_browsertest.cc b/chrome/browser/instant/instant_extended_browsertest.cc index aad12bc..2e589c9 100644 --- a/chrome/browser/instant/instant_extended_browsertest.cc +++ b/chrome/browser/instant/instant_extended_browsertest.cc @@ -722,8 +722,8 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedTest, MostVisited) { EXPECT_EQ(most_visited_items_count_, old_most_visited_items_count); } -// Only implemented in Views currently: http://crbug.com/164723 -#if defined(OS_WIN) || defined(OS_CHROMEOS) +// Only implemented in Views and Mac currently: http://crbug.com/164723 +#if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX) #define MAYBE_HomeButtonAffectsMargin HomeButtonAffectsMargin #else #define MAYBE_HomeButtonAffectsMargin DISABLED_HomeButtonAffectsMargin diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm index 94c1368..f653b4f 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm @@ -299,6 +299,11 @@ void LocationBarViewMac::OnChanged() { location_icon_decoration_->SetImage(image); ev_bubble_decoration_->SetImage(image); Layout(); + + if (browser_->instant_controller()) { + browser_->instant_controller()->SetOmniboxBounds( + gfx::Rect(NSRectToCGRect([field_ frame]))); + } } void LocationBarViewMac::OnSelectionBoundsChanged() { |