OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/android/blimp/chrome_blimp_client_context_delegate.h" |
| 6 |
| 7 #include "blimp/client/public/blimp_client_context.h" |
| 8 #include "blimp/client/public/blimp_client_context_delegate.h" |
| 9 #include "blimp/client/public/blimp_contents.h" |
| 10 #include "chrome/browser/android/blimp/blimp_client_context_factory.h" |
| 11 #include "chrome/browser/android/blimp/blimp_contents_profile_attachment.h" |
| 12 #include "chrome/browser/profiles/profile.h" |
| 13 |
| 14 namespace chrome { |
| 15 |
| 16 ChromeBlimpClientContextDelegate::ChromeBlimpClientContextDelegate( |
| 17 Profile* profile) |
| 18 : profile_(profile) { |
| 19 blimp::client::BlimpClientContext* blimp_client_context = |
| 20 BlimpClientContextFactory::GetForBrowserContext(profile_); |
| 21 blimp_client_context->SetDelegate(this); |
| 22 } |
| 23 |
| 24 ChromeBlimpClientContextDelegate::~ChromeBlimpClientContextDelegate() { |
| 25 blimp::client::BlimpClientContext* blimp_client_context = |
| 26 BlimpClientContextFactory::GetForBrowserContext(profile_); |
| 27 blimp_client_context->SetDelegate(nullptr); |
| 28 } |
| 29 |
| 30 void ChromeBlimpClientContextDelegate::AttachBlimpContentsHelpers( |
| 31 blimp::client::BlimpContents* blimp_contents) { |
| 32 AttachProfileToBlimpContents(blimp_contents, profile_); |
| 33 } |
| 34 |
| 35 } // namespace chrome |
OLD | NEW |