| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "services/navigation/public/cpp/view.h" | 5 #include "services/navigation/public/cpp/view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "services/navigation/public/cpp/view_delegate.h" | 8 #include "services/navigation/public/cpp/view_delegate.h" |
| 9 #include "services/navigation/public/cpp/view_observer.h" | 9 #include "services/navigation/public/cpp/view_observer.h" |
| 10 #include "services/ui/public/cpp/window.h" | 10 #include "services/ui/public/cpp/window.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 void View::ShowInterstitial(const std::string& html) { | 80 void View::ShowInterstitial(const std::string& html) { |
| 81 view_->ShowInterstitial(html); | 81 view_->ShowInterstitial(html); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void View::HideInterstitial() { | 84 void View::HideInterstitial() { |
| 85 view_->HideInterstitial(); | 85 view_->HideInterstitial(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void View::SetResizerSize(const gfx::Size& size) { | |
| 89 view_->SetResizerSize(size); | |
| 90 } | |
| 91 | |
| 92 void View::EmbedInWindow(ui::Window* parent) { | 88 void View::EmbedInWindow(ui::Window* parent) { |
| 93 ui::mojom::WindowTreeClientPtr client; | 89 ui::mojom::WindowTreeClientPtr client; |
| 94 view_->GetWindowTreeClient(GetProxy(&client)); | 90 view_->GetWindowTreeClient(GetProxy(&client)); |
| 95 parent->Embed(std::move(client)); | 91 parent->Embed(std::move(client)); |
| 96 } | 92 } |
| 97 | 93 |
| 98 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
| 99 // View, mojom::ViewClient implementation: | 95 // View, mojom::ViewClient implementation: |
| 100 | 96 |
| 101 void View::OpenURL(mojom::OpenURLParamsPtr params) { | 97 void View::OpenURL(mojom::OpenURLParamsPtr params) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 if (from_front) { | 170 if (from_front) { |
| 175 auto it = navigation_list_.begin() + count; | 171 auto it = navigation_list_.begin() + count; |
| 176 navigation_list_.erase(navigation_list_.begin(), it); | 172 navigation_list_.erase(navigation_list_.begin(), it); |
| 177 } else { | 173 } else { |
| 178 auto it = navigation_list_.end() - count; | 174 auto it = navigation_list_.end() - count; |
| 179 navigation_list_.erase(it, navigation_list_.end()); | 175 navigation_list_.erase(it, navigation_list_.end()); |
| 180 } | 176 } |
| 181 } | 177 } |
| 182 | 178 |
| 183 } // namespace navigation | 179 } // namespace navigation |
| OLD | NEW |