Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/android/blimp/chrome_blimp_client_context_delegate.h" | 5 #include "chrome/browser/android/blimp/chrome_blimp_client_context_delegate.h" |
| 6 | 6 |
| 7 #include "blimp/client/public/blimp_client_context.h" | 7 #include "blimp/client/public/blimp_client_context.h" |
| 8 #include "blimp/client/public/blimp_client_context_delegate.h" | 8 #include "blimp/client/public/blimp_client_context_delegate.h" |
| 9 #include "blimp/client/public/contents/blimp_contents.h" | 9 #include "blimp/client/public/contents/blimp_contents.h" |
| 10 #include "chrome/browser/android/blimp/blimp_client_context_factory.h" | 10 #include "chrome/browser/android/blimp/blimp_client_context_factory.h" |
| 11 #include "chrome/browser/android/blimp/blimp_contents_profile_attachment.h" | 11 #include "chrome/browser/android/blimp/blimp_contents_profile_attachment.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 | 13 |
| 14 #if defined(OS_ANDROID) | |
| 15 #include "chrome/browser/android/blimp/chrome_blimp_client_context_delegate_andr oid.h" | |
| 16 #endif // defined(OS_ANDROID) | |
| 17 | |
| 14 ChromeBlimpClientContextDelegate::ChromeBlimpClientContextDelegate( | 18 ChromeBlimpClientContextDelegate::ChromeBlimpClientContextDelegate( |
| 15 Profile* profile) | 19 Profile* profile) |
| 16 : profile_(profile), | 20 : profile_(profile), |
| 17 blimp_client_context_( | 21 blimp_client_context_( |
| 18 BlimpClientContextFactory::GetForBrowserContext(profile)) { | 22 BlimpClientContextFactory::GetForBrowserContext(profile)) { |
| 19 blimp_client_context_->SetDelegate(this); | 23 blimp_client_context_->SetDelegate(this); |
| 20 } | 24 } |
| 21 | 25 |
| 22 ChromeBlimpClientContextDelegate::~ChromeBlimpClientContextDelegate() { | 26 ChromeBlimpClientContextDelegate::~ChromeBlimpClientContextDelegate() { |
| 23 blimp_client_context_->SetDelegate(nullptr); | 27 blimp_client_context_->SetDelegate(nullptr); |
| 24 } | 28 } |
| 25 | 29 |
| 30 #if defined(OS_ANDROID) | |
| 31 | |
|
nyquist
2016/08/01 18:24:07
Nit: Remove empty line.
| |
| 32 base::android::ScopedJavaLocalRef<jobject> | |
| 33 ChromeBlimpClientContextDelegate::GetJavaObject() { | |
| 34 return base::android::ScopedJavaLocalRef<jobject>(); | |
| 35 } | |
| 36 #endif // defined(OS_ANDROID) | |
| 37 | |
| 26 void ChromeBlimpClientContextDelegate::AttachBlimpContentsHelpers( | 38 void ChromeBlimpClientContextDelegate::AttachBlimpContentsHelpers( |
| 27 blimp::client::BlimpContents* blimp_contents) { | 39 blimp::client::BlimpContents* blimp_contents) { |
| 28 AttachProfileToBlimpContents(blimp_contents, profile_); | 40 AttachProfileToBlimpContents(blimp_contents, profile_); |
| 29 } | 41 } |
| OLD | NEW |