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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 mojom::NavigationEntryPtr entry_ptr(mojom::NavigationEntry::New()); | 51 mojom::NavigationEntryPtr entry_ptr(mojom::NavigationEntry::New()); |
52 entry_ptr->id = entry.GetUniqueID(); | 52 entry_ptr->id = entry.GetUniqueID(); |
53 entry_ptr->url = entry.GetURL(); | 53 entry_ptr->url = entry.GetURL(); |
54 entry_ptr->title = base::UTF16ToUTF8(entry.GetTitle()); | 54 entry_ptr->title = base::UTF16ToUTF8(entry.GetTitle()); |
55 entry_ptr->redirect_chain = entry.GetRedirectChain(); | 55 entry_ptr->redirect_chain = entry.GetRedirectChain(); |
56 return entry_ptr; | 56 return entry_ptr; |
57 } | 57 } |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
61 ViewImpl::ViewImpl(std::unique_ptr<shell::Connector> connector, | 61 ViewImpl::ViewImpl(std::unique_ptr<service_manager::Connector> connector, |
62 const std::string& client_user_id, | 62 const std::string& client_user_id, |
63 mojom::ViewClientPtr client, | 63 mojom::ViewClientPtr client, |
64 std::unique_ptr<shell::ServiceContextRef> ref) | 64 std::unique_ptr<service_manager::ServiceContextRef> ref) |
65 : connector_(std::move(connector)), | 65 : connector_(std::move(connector)), |
66 client_(std::move(client)), | 66 client_(std::move(client)), |
67 ref_(std::move(ref)), | 67 ref_(std::move(ref)), |
68 web_view_(new views::WebView( | 68 web_view_(new views::WebView( |
69 content::BrowserContext::GetBrowserContextForServiceUserId( | 69 content::BrowserContext::GetBrowserContextForServiceUserId( |
70 client_user_id))) { | 70 client_user_id))) { |
71 web_view_->GetWebContents()->SetDelegate(this); | 71 web_view_->GetWebContents()->SetDelegate(this); |
72 const content::NavigationController* controller = | 72 const content::NavigationController* controller = |
73 &web_view_->GetWebContents()->GetController(); | 73 &web_view_->GetWebContents()->GetController(); |
74 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, | 74 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, |
(...skipping 213 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 |