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

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

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 #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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 } 584 }
585 return icons_updated; 585 return icons_updated;
586 } 586 }
587 587
588 void LocationBarViewMac::DeletePageActionDecorations() { 588 void LocationBarViewMac::DeletePageActionDecorations() {
589 // TODO(shess): Deleting these decorations could result in the cell 589 // TODO(shess): Deleting these decorations could result in the cell
590 // refering to them before things are laid out again. Meanwhile, at 590 // refering to them before things are laid out again. Meanwhile, at
591 // least fail safe. 591 // least fail safe.
592 [[field_ cell] clearDecorations]; 592 [[field_ cell] clearDecorations];
593 593
594 page_action_decorations_.reset(); 594 page_action_decorations_.clear();
595 } 595 }
596 596
597 void LocationBarViewMac::RefreshPageActionDecorations() { 597 void LocationBarViewMac::RefreshPageActionDecorations() {
598 if (!IsEditable()) { 598 if (!IsEditable()) {
599 DeletePageActionDecorations(); 599 DeletePageActionDecorations();
600 return; 600 return;
601 } 601 }
602 602
603 TabContents* tab_contents = GetTabContents(); 603 TabContents* tab_contents = GetTabContents();
604 if (!tab_contents) { 604 if (!tab_contents) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 void LocationBarViewMac::UpdateChromeToMobileEnabled() { 719 void LocationBarViewMac::UpdateChromeToMobileEnabled() {
720 if (!chrome_to_mobile_decoration_.get()) 720 if (!chrome_to_mobile_decoration_.get())
721 return; 721 return;
722 722
723 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); 723 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled());
724 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && 724 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() &&
725 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices(); 725 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices();
726 chrome_to_mobile_decoration_->SetVisible(enabled); 726 chrome_to_mobile_decoration_->SetVisible(enabled);
727 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); 727 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled);
728 } 728 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698