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

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

Issue 10796116: [Web Intents] Basic location bar UI for window disposition picker affordance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 4 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 DeletePageActionDecorations(); 228 DeletePageActionDecorations();
229 Layout(); 229 Layout();
230 if (page_action_decorations_.size() != count_before) { 230 if (page_action_decorations_.size() != count_before) {
231 content::NotificationService::current()->Notify( 231 content::NotificationService::current()->Notify(
232 chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, 232 chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
233 content::Source<LocationBar>(this), 233 content::Source<LocationBar>(this),
234 content::NotificationService::NoDetails()); 234 content::NotificationService::NoDetails());
235 } 235 }
236 } 236 }
237 237
238 void LocationBarViewMac::UpdateWebIntentsButton() {
239 // TODO(gbillock): Implement web intents tool for mac
240 }
241
238 void LocationBarViewMac::SaveStateToContents(WebContents* contents) { 242 void LocationBarViewMac::SaveStateToContents(WebContents* contents) {
239 // TODO(shess): Why SaveStateToContents vs SaveStateToTab? 243 // TODO(shess): Why SaveStateToContents vs SaveStateToTab?
240 omnibox_view_->SaveStateToTab(contents); 244 omnibox_view_->SaveStateToTab(contents);
241 } 245 }
242 246
243 void LocationBarViewMac::Update(const WebContents* contents, 247 void LocationBarViewMac::Update(const WebContents* contents,
244 bool should_restore_state) { 248 bool should_restore_state) {
245 bool star_enabled = IsStarEnabled(); 249 bool star_enabled = IsStarEnabled();
246 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled); 250 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled);
247 star_decoration_->SetVisible(star_enabled); 251 star_decoration_->SetVisible(star_enabled);
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 void LocationBarViewMac::UpdateChromeToMobileEnabled() { 730 void LocationBarViewMac::UpdateChromeToMobileEnabled() {
727 if (!chrome_to_mobile_decoration_.get()) 731 if (!chrome_to_mobile_decoration_.get())
728 return; 732 return;
729 733
730 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); 734 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled());
731 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && 735 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() &&
732 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles(); 736 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles();
733 chrome_to_mobile_decoration_->SetVisible(enabled); 737 chrome_to_mobile_decoration_->SetVisible(enabled);
734 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); 738 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled);
735 } 739 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698