| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 bool LocationBarViewMac::ShowPageActionPopup( | 250 bool LocationBarViewMac::ShowPageActionPopup( |
| 251 const extensions::Extension* extension, bool grant_active_tab) { | 251 const extensions::Extension* extension, bool grant_active_tab) { |
| 252 for (const auto& decoration : page_action_decorations_) { | 252 for (const auto& decoration : page_action_decorations_) { |
| 253 if (decoration->GetExtension() == extension) | 253 if (decoration->GetExtension() == extension) |
| 254 return decoration->ActivatePageAction(grant_active_tab); | 254 return decoration->ActivatePageAction(grant_active_tab); |
| 255 } | 255 } |
| 256 return false; | 256 return false; |
| 257 } | 257 } |
| 258 | 258 |
| 259 void LocationBarViewMac::UpdateOpenPDFInReaderPrompt() { | |
| 260 // Not implemented on Mac. | |
| 261 } | |
| 262 | |
| 263 void LocationBarViewMac::SaveStateToContents(WebContents* contents) { | 259 void LocationBarViewMac::SaveStateToContents(WebContents* contents) { |
| 264 // TODO(shess): Why SaveStateToContents vs SaveStateToTab? | 260 // TODO(shess): Why SaveStateToContents vs SaveStateToTab? |
| 265 omnibox_view_->SaveStateToTab(contents); | 261 omnibox_view_->SaveStateToTab(contents); |
| 266 } | 262 } |
| 267 | 263 |
| 268 void LocationBarViewMac::Revert() { | 264 void LocationBarViewMac::Revert() { |
| 269 omnibox_view_->RevertAll(); | 265 omnibox_view_->RevertAll(); |
| 270 } | 266 } |
| 271 | 267 |
| 272 const OmniboxView* LocationBarViewMac::GetOmniboxView() const { | 268 const OmniboxView* LocationBarViewMac::GetOmniboxView() const { |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 OnDecorationsChanged(); | 945 OnDecorationsChanged(); |
| 950 } | 946 } |
| 951 | 947 |
| 952 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 948 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 953 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 949 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 954 std::vector<NSView*> views; | 950 std::vector<NSView*> views; |
| 955 for (auto* decoration : decorations) | 951 for (auto* decoration : decorations) |
| 956 views.push_back(decoration->GetAccessibilityView()); | 952 views.push_back(decoration->GetAccessibilityView()); |
| 957 return views; | 953 return views; |
| 958 } | 954 } |
| OLD | NEW |