| 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/view_impl.h" | 5 #include "services/navigation/view_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
| 10 #include "content/public/browser/interstitial_page.h" | 10 #include "content/public/browser/interstitial_page.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ViewImpl::GoForward() { | 94 void ViewImpl::GoForward() { |
| 95 web_view_->GetWebContents()->GetController().GoForward(); | 95 web_view_->GetWebContents()->GetController().GoForward(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void ViewImpl::NavigateToOffset(int offset) { | 98 void ViewImpl::NavigateToOffset(int offset) { |
| 99 web_view_->GetWebContents()->GetController().GoToOffset(offset); | 99 web_view_->GetWebContents()->GetController().GoToOffset(offset); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void ViewImpl::Reload(bool skip_cache) { | 102 void ViewImpl::Reload(bool bypass_cache) { |
| 103 if (skip_cache) | 103 web_view_->GetWebContents()->GetController().Reload( |
| 104 web_view_->GetWebContents()->GetController().Reload(true); | 104 true, |
| 105 else | 105 bypass_cache ? content::ReloadType::BYPASSING_CACHE |
| 106 web_view_->GetWebContents()->GetController().ReloadBypassingCache(true); | 106 : content::ReloadType::NORMAL); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ViewImpl::Stop() { | 109 void ViewImpl::Stop() { |
| 110 web_view_->GetWebContents()->Stop(); | 110 web_view_->GetWebContents()->Stop(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ViewImpl::GetWindowTreeClient(ui::mojom::WindowTreeClientRequest request) { | 113 void ViewImpl::GetWindowTreeClient(ui::mojom::WindowTreeClientRequest request) { |
| 114 window_tree_client_ = | 114 window_tree_client_ = |
| 115 base::MakeUnique<ui::WindowTreeClient>(this, nullptr, std::move(request)); | 115 base::MakeUnique<ui::WindowTreeClient>(this, nullptr, std::move(request)); |
| 116 } | 116 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 views::Widget* ViewImpl::GetWidget() { | 289 views::Widget* ViewImpl::GetWidget() { |
| 290 return web_view_->GetWidget(); | 290 return web_view_->GetWidget(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 const views::Widget* ViewImpl::GetWidget() const { | 293 const views::Widget* ViewImpl::GetWidget() const { |
| 294 return web_view_->GetWidget(); | 294 return web_view_->GetWidget(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // navigation | 297 } // navigation |
| OLD | NEW |