| Index: chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
|
| diff --git a/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc b/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0842dd31f32d61bc66e14e34b4c3b620321fd878
|
| --- /dev/null
|
| +++ b/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/android/blimp/chrome_blimp_client_context_delegate.h"
|
| +
|
| +#include "blimp/client/public/blimp_client_context.h"
|
| +#include "blimp/client/public/blimp_client_context_delegate.h"
|
| +#include "blimp/client/public/blimp_contents.h"
|
| +#include "chrome/browser/android/blimp/blimp_client_context_factory.h"
|
| +#include "chrome/browser/android/blimp/blimp_contents_profile_attachment.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +ChromeBlimpClientContextDelegate::ChromeBlimpClientContextDelegate(
|
| + Profile* profile)
|
| + : profile_(profile) {
|
| + blimp::client::BlimpClientContext* blimp_client_context =
|
| + BlimpClientContextFactory::GetForBrowserContext(profile_);
|
| + blimp_client_context->SetDelegate(this);
|
| +}
|
| +
|
| +ChromeBlimpClientContextDelegate::~ChromeBlimpClientContextDelegate() {
|
| + blimp::client::BlimpClientContext* blimp_client_context =
|
| + BlimpClientContextFactory::GetForBrowserContext(profile_);
|
| + blimp_client_context->SetDelegate(nullptr);
|
| +}
|
| +
|
| +void ChromeBlimpClientContextDelegate::AttachBlimpContentsHelpers(
|
| + blimp::client::BlimpContents* blimp_contents) {
|
| + AttachProfileToBlimpContents(blimp_contents, profile_);
|
| +}
|
| +
|
| +} // namespace chrome
|
|
|