| OLD | NEW |
| 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 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 } | 323 } |
| 324 | 324 |
| 325 NSPoint LocationBarViewMac::GetSaveCreditCardBubblePoint() const { | 325 NSPoint LocationBarViewMac::GetSaveCreditCardBubblePoint() const { |
| 326 return [field_ bubblePointForDecoration:save_credit_card_decoration_.get()]; | 326 return [field_ bubblePointForDecoration:save_credit_card_decoration_.get()]; |
| 327 } | 327 } |
| 328 | 328 |
| 329 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { | 329 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { |
| 330 return [field_ bubblePointForDecoration:GetPageInfoDecoration()]; | 330 return [field_ bubblePointForDecoration:GetPageInfoDecoration()]; |
| 331 } | 331 } |
| 332 | 332 |
| 333 NSPoint LocationBarViewMac::GetInfoBarAnchorPoint() const { |
| 334 return [field_ arrowAnchorPointForDecoration:GetPageInfoDecoration()]; |
| 335 } |
| 336 |
| 333 void LocationBarViewMac::OnDecorationsChanged() { | 337 void LocationBarViewMac::OnDecorationsChanged() { |
| 334 // TODO(shess): The field-editor frame and cursor rects should not | 338 // TODO(shess): The field-editor frame and cursor rects should not |
| 335 // change, here. | 339 // change, here. |
| 336 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 340 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 337 for (auto* decoration : decorations) | 341 for (auto* decoration : decorations) |
| 338 UpdateAccessibilityView(decoration); | 342 UpdateAccessibilityView(decoration); |
| 339 [field_ updateMouseTracking]; | 343 [field_ updateMouseTracking]; |
| 340 [field_ resetFieldEditorFrameIfNeeded]; | 344 [field_ resetFieldEditorFrameIfNeeded]; |
| 341 [field_ setNeedsDisplay:YES]; | 345 [field_ setNeedsDisplay:YES]; |
| 342 } | 346 } |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 OnDecorationsChanged(); | 805 OnDecorationsChanged(); |
| 802 } | 806 } |
| 803 | 807 |
| 804 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 808 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 805 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 809 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 806 std::vector<NSView*> views; | 810 std::vector<NSView*> views; |
| 807 for (auto* decoration : decorations) | 811 for (auto* decoration : decorations) |
| 808 views.push_back(decoration->GetAccessibilityView()); | 812 views.push_back(decoration->GetAccessibilityView()); |
| 809 return views; | 813 return views; |
| 810 } | 814 } |
| OLD | NEW |