| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 | 260 |
| 261 void ViewImpl::OnEmbed(ui::Window* root) { | 261 void ViewImpl::OnEmbed(ui::Window* root) { |
| 262 DCHECK(!widget_.get()); | 262 DCHECK(!widget_.get()); |
| 263 widget_.reset(new views::Widget); | 263 widget_.reset(new views::Widget); |
| 264 views::Widget::InitParams params( | 264 views::Widget::InitParams params( |
| 265 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 265 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 266 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 266 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 267 params.delegate = this; | 267 params.delegate = this; |
| 268 params.native_widget = new views::NativeWidgetMus( | 268 params.native_widget = new views::NativeWidgetMus( |
| 269 widget_.get(), root, ui::mojom::SurfaceType::DEFAULT); | 269 widget_.get(), root, ui::mojom::CompositorFrameSinkType::DEFAULT); |
| 270 widget_->Init(params); | 270 widget_->Init(params); |
| 271 widget_->Show(); | 271 widget_->Show(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void ViewImpl::OnEmbedRootDestroyed(ui::Window* root) { | 274 void ViewImpl::OnEmbedRootDestroyed(ui::Window* root) { |
| 275 window_tree_client_.reset(); | 275 window_tree_client_.reset(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void ViewImpl::OnLostConnection(ui::WindowTreeClient* client) { | 278 void ViewImpl::OnLostConnection(ui::WindowTreeClient* client) { |
| 279 window_tree_client_.reset(); | 279 window_tree_client_.reset(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void ViewImpl::OnPointerEventObserved(const ui::PointerEvent& event, | 282 void ViewImpl::OnPointerEventObserved(const ui::PointerEvent& event, |
| 283 ui::Window* target) {} | 283 ui::Window* target) {} |
| 284 | 284 |
| 285 views::View* ViewImpl::GetContentsView() { | 285 views::View* ViewImpl::GetContentsView() { |
| 286 return web_view_; | 286 return web_view_; |
| 287 } | 287 } |
| 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 |