Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/guest_view_base.h" | 5 #include "extensions/browser/guest_view/guest_view_base.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 CHECK(embedder_web_contents); | 125 CHECK(embedder_web_contents); |
| 126 int embedder_process_id = | 126 int embedder_process_id = |
| 127 embedder_web_contents->GetRenderProcessHost()->GetID(); | 127 embedder_web_contents->GetRenderProcessHost()->GetID(); |
| 128 | 128 |
| 129 Feature::Availability availability = feature->IsAvailableToContext( | 129 Feature::Availability availability = feature->IsAvailableToContext( |
| 130 embedder_extension, | 130 embedder_extension, |
| 131 process_map->GetMostLikelyContextType(embedder_extension, | 131 process_map->GetMostLikelyContextType(embedder_extension, |
| 132 embedder_process_id), | 132 embedder_process_id), |
| 133 embedder_web_contents->GetLastCommittedURL()); | 133 embedder_web_contents->GetLastCommittedURL()); |
| 134 if (!availability.is_available()) { | 134 if (!availability.is_available()) { |
| 135 callback.Run(NULL); | 135 // TODO(lazyboy): Fix api feature stuff. |
| 136 return; | 136 //callback.Run(NULL); |
|
Fady Samuel
2014/09/02 15:08:25
This commenting out should be unnecessary if you c
lazyboy
2014/09/02 20:17:22
Done.
| |
| 137 //return; | |
| 137 } | 138 } |
| 138 | 139 |
| 139 CreateWebContents(embedder_extension_id, | 140 CreateWebContents(embedder_extension_id, |
| 140 embedder_process_id, | 141 embedder_process_id, |
| 141 create_params, | 142 create_params, |
| 142 base::Bind(&GuestViewBase::CompleteInit, | 143 base::Bind(&GuestViewBase::CompleteInit, |
| 143 AsWeakPtr(), | 144 AsWeakPtr(), |
| 144 embedder_extension_id, | 145 embedder_extension_id, |
| 145 embedder_process_id, | 146 embedder_process_id, |
| 146 callback)); | 147 callback)); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 443 } | 444 } |
| 444 | 445 |
| 445 // static | 446 // static |
| 446 void GuestViewBase::RegisterGuestViewTypes() { | 447 void GuestViewBase::RegisterGuestViewTypes() { |
| 447 AppViewGuest::Register(); | 448 AppViewGuest::Register(); |
| 448 WebViewGuest::Register(); | 449 WebViewGuest::Register(); |
| 449 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); | 450 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); |
| 450 } | 451 } |
| 451 | 452 |
| 452 } // namespace extensions | 453 } // namespace extensions |
| OLD | NEW |