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_manager.h" | 5 #include "components/guest_view/browser/guest_view_manager.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "components/guest_view/browser/guest_view_base.h" |
| 9 #include "components/guest_view/browser/guest_view_manager_delegate.h" |
| 10 #include "components/guest_view/browser/guest_view_manager_factory.h" |
| 11 #include "components/guest_view/common/guest_view_constants.h" |
8 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/render_frame_host.h" | 13 #include "content/public/browser/render_frame_host.h" |
10 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
11 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
12 #include "content/public/browser/user_metrics.h" | 16 #include "content/public/browser/user_metrics.h" |
13 #include "content/public/browser/web_contents_observer.h" | 17 #include "content/public/browser/web_contents_observer.h" |
14 #include "content/public/common/child_process_host.h" | 18 #include "content/public/common/child_process_host.h" |
15 #include "content/public/common/result_codes.h" | 19 #include "content/public/common/result_codes.h" |
16 #include "content/public/common/url_constants.h" | 20 #include "content/public/common/url_constants.h" |
17 #include "extensions/browser/guest_view/guest_view_base.h" | |
18 #include "extensions/browser/guest_view/guest_view_manager_delegate.h" | |
19 #include "extensions/browser/guest_view/guest_view_manager_factory.h" | |
20 #include "extensions/common/guest_view/guest_view_constants.h" | |
21 #include "net/base/escape.h" | 21 #include "net/base/escape.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 using content::BrowserContext; | 24 using content::BrowserContext; |
25 using content::SiteInstance; | 25 using content::SiteInstance; |
26 using content::WebContents; | 26 using content::WebContents; |
27 using guestview::GuestViewManagerDelegate; | |
28 | 27 |
29 namespace extensions { | 28 namespace guestview { |
30 | 29 |
31 // static | 30 // static |
32 GuestViewManagerFactory* GuestViewManager::factory_ = nullptr; | 31 GuestViewManagerFactory* GuestViewManager::factory_ = nullptr; |
33 | 32 |
34 GuestViewManager::GuestViewManager( | 33 GuestViewManager::GuestViewManager( |
35 content::BrowserContext* context, | 34 content::BrowserContext* context, |
36 scoped_ptr<GuestViewManagerDelegate> delegate) | 35 scoped_ptr<GuestViewManagerDelegate> delegate) |
37 : current_instance_id_(0), | 36 : current_instance_id_(0), |
38 last_instance_id_removed_(0), | 37 last_instance_id_removed_(0), |
39 context_(context), | 38 context_(context), |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 364 |
366 return element_instance_id < other.element_instance_id; | 365 return element_instance_id < other.element_instance_id; |
367 } | 366 } |
368 | 367 |
369 bool GuestViewManager::ElementInstanceKey::operator==( | 368 bool GuestViewManager::ElementInstanceKey::operator==( |
370 const GuestViewManager::ElementInstanceKey& other) const { | 369 const GuestViewManager::ElementInstanceKey& other) const { |
371 return (embedder_process_id == other.embedder_process_id) && | 370 return (embedder_process_id == other.embedder_process_id) && |
372 (element_instance_id == other.element_instance_id); | 371 (element_instance_id == other.element_instance_id); |
373 } | 372 } |
374 | 373 |
375 } // namespace extensions | 374 } // namespace guestview |
OLD | NEW |