| 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 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 5 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
| 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Returns the view that holds the contents of this tab. | 39 // Returns the view that holds the contents of this tab. |
| 40 virtual BlimpContentsView* GetView() = 0; | 40 virtual BlimpContentsView* GetView() = 0; |
| 41 | 41 |
| 42 // Will cause this BlimpContents and the remote contents to show and start or | 42 // Will cause this BlimpContents and the remote contents to show and start or |
| 43 // stop rendering content respectively. | 43 // stop rendering content respectively. |
| 44 virtual void Show() = 0; | 44 virtual void Show() = 0; |
| 45 virtual void Hide() = 0; | 45 virtual void Hide() = 0; |
| 46 | 46 |
| 47 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
| 48 // Returns the native BlimpContents corresponding to a Java object of the type |
| 49 // org.chromium.blimp.BlimpContents or nullptr if the lookup fails. |
| 50 static BlimpContents* FromJavaObject( |
| 51 JNIEnv* env, |
| 52 const base::android::JavaRef<jobject>& jobj); |
| 53 |
| 48 // Returns a Java object of the type BlimpContents for the given | 54 // Returns a Java object of the type BlimpContents for the given |
| 49 // BlimpContents. | 55 // BlimpContents. |
| 50 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; | 56 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; |
| 51 #endif | 57 #endif |
| 52 | 58 |
| 53 protected: | 59 protected: |
| 54 BlimpContents() {} | 60 BlimpContents() {} |
| 55 | 61 |
| 56 private: | 62 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(BlimpContents); | 63 DISALLOW_COPY_AND_ASSIGN(BlimpContents); |
| 58 }; | 64 }; |
| 59 | 65 |
| 60 } // namespace client | 66 } // namespace client |
| 61 } // namespace blimp | 67 } // namespace blimp |
| 62 | 68 |
| 63 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 69 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
| OLD | NEW |