| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/guest_view/chrome_guest_view_manager_delegate.h" | 5 #include "chrome/browser/guest_view/chrome_extensions_guest_view_manager_delegat
e.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/task_management/web_contents_tags.h" | 8 #include "chrome/browser/task_management/web_contents_tags.h" |
| 9 | 9 |
| 10 #if defined(OS_CHROMEOS) | 10 #if defined(OS_CHROMEOS) |
| 11 #include "chrome/browser/chromeos/app_mode/app_session.h" | 11 #include "chrome/browser/chromeos/app_mode/app_session.h" |
| 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 | 16 |
| 17 ChromeGuestViewManagerDelegate::ChromeGuestViewManagerDelegate( | 17 ChromeExtensionsGuestViewManagerDelegate:: |
| 18 content::BrowserContext* context) | 18 ChromeExtensionsGuestViewManagerDelegate(content::BrowserContext* context) |
| 19 : ExtensionsGuestViewManagerDelegate(context) { | 19 : ExtensionsGuestViewManagerDelegate(context) {} |
| 20 } | |
| 21 | 20 |
| 22 ChromeGuestViewManagerDelegate::~ChromeGuestViewManagerDelegate() { | 21 ChromeExtensionsGuestViewManagerDelegate:: |
| 23 } | 22 ~ChromeExtensionsGuestViewManagerDelegate() {} |
| 24 | 23 |
| 25 void ChromeGuestViewManagerDelegate::OnGuestAdded( | 24 void ChromeExtensionsGuestViewManagerDelegate::OnGuestAdded( |
| 26 content::WebContents* guest_web_contents) const { | 25 content::WebContents* guest_web_contents) const { |
| 27 // Attaches the task-manager-specific tag for the GuestViews to its | 26 // Attaches the task-manager-specific tag for the GuestViews to its |
| 28 // |guest_web_contents| so that their corresponding tasks show up in the task | 27 // |guest_web_contents| so that their corresponding tasks show up in the task |
| 29 // manager. | 28 // manager. |
| 30 task_management::WebContentsTags::CreateForGuestContents(guest_web_contents); | 29 task_management::WebContentsTags::CreateForGuestContents(guest_web_contents); |
| 31 | 30 |
| 32 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
| 33 // Notifies kiosk session about the added guest. | 32 // Notifies kiosk session about the added guest. |
| 34 chromeos::AppSession* app_session = | 33 chromeos::AppSession* app_session = |
| 35 chromeos::KioskAppManager::Get()->app_session(); | 34 chromeos::KioskAppManager::Get()->app_session(); |
| 36 if (app_session) | 35 if (app_session) |
| 37 app_session->OnGuestAdded(guest_web_contents); | 36 app_session->OnGuestAdded(guest_web_contents); |
| 38 #endif | 37 #endif |
| 39 } | 38 } |
| 40 | 39 |
| 41 } // namespace extensions | 40 } // namespace extensions |
| OLD | NEW |