| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 374 |
| 375 string16 LocationBarViewMac::GetTitle() const { | 375 string16 LocationBarViewMac::GetTitle() const { |
| 376 NOTIMPLEMENTED(); | 376 NOTIMPLEMENTED(); |
| 377 return string16(); | 377 return string16(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void LocationBarViewMac::Revert() { | 380 void LocationBarViewMac::Revert() { |
| 381 edit_view_->RevertAll(); | 381 edit_view_->RevertAll(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 const AutocompleteEditView* LocationBarViewMac::location_entry() const { |
| 385 return edit_view_.get(); |
| 386 } |
| 387 |
| 388 AutocompleteEditView* LocationBarViewMac::location_entry() { |
| 389 return edit_view_.get(); |
| 390 } |
| 391 |
| 392 LocationBarTesting* LocationBarViewMac::GetLocationBarForTesting() { |
| 393 return this; |
| 394 } |
| 395 |
| 384 // TODO(pamg): Change all these, here and for other platforms, to size_t. | 396 // TODO(pamg): Change all these, here and for other platforms, to size_t. |
| 385 int LocationBarViewMac::PageActionCount() { | 397 int LocationBarViewMac::PageActionCount() { |
| 386 return static_cast<int>(page_action_decorations_.size()); | 398 return static_cast<int>(page_action_decorations_.size()); |
| 387 } | 399 } |
| 388 | 400 |
| 389 int LocationBarViewMac::PageActionVisibleCount() { | 401 int LocationBarViewMac::PageActionVisibleCount() { |
| 390 int result = 0; | 402 int result = 0; |
| 391 for (size_t i = 0; i < page_action_decorations_.size(); ++i) { | 403 for (size_t i = 0; i < page_action_decorations_.size(); ++i) { |
| 392 if (page_action_decorations_[i]->IsVisible()) | 404 if (page_action_decorations_[i]->IsVisible()) |
| 393 ++result; | 405 ++result; |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 | 708 |
| 697 // These need to change anytime the layout changes. | 709 // These need to change anytime the layout changes. |
| 698 // TODO(shess): Anytime the field editor might have changed, the | 710 // TODO(shess): Anytime the field editor might have changed, the |
| 699 // cursor rects almost certainly should have changed. The tooltips | 711 // cursor rects almost certainly should have changed. The tooltips |
| 700 // might change even when the rects don't change. | 712 // might change even when the rects don't change. |
| 701 [field_ resetFieldEditorFrameIfNeeded]; | 713 [field_ resetFieldEditorFrameIfNeeded]; |
| 702 [field_ updateCursorAndToolTipRects]; | 714 [field_ updateCursorAndToolTipRects]; |
| 703 | 715 |
| 704 [field_ setNeedsDisplay:YES]; | 716 [field_ setNeedsDisplay:YES]; |
| 705 } | 717 } |
| OLD | NEW |