| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/web_contents_user_data.h" | 9 #include "content/public/browser/web_contents_user_data.h" |
| 10 | 10 |
| 11 namespace ui { | |
| 12 class WindowAndroid; | |
| 13 } | |
| 14 | |
| 15 // Per-tab class to provide access to ViewAndroid object. | 11 // Per-tab class to provide access to ViewAndroid object. |
| 16 class ViewAndroidHelper | 12 class ViewAndroidHelper |
| 17 : public content::WebContentsUserData<ViewAndroidHelper> { | 13 : public content::WebContentsUserData<ViewAndroidHelper> { |
| 18 public: | 14 public: |
| 19 ~ViewAndroidHelper() override; | 15 ~ViewAndroidHelper() override; |
| 20 | 16 |
| 21 void SetViewAndroid(ui::ViewAndroid* view_android); | 17 void SetViewAndroid(ui::ViewAndroid* view_android); |
| 22 ui::ViewAndroid* GetViewAndroid(); | 18 ui::ViewAndroid* GetViewAndroid(); |
| 23 | 19 |
| 24 private: | 20 private: |
| 25 explicit ViewAndroidHelper(content::WebContents* web_contents); | 21 explicit ViewAndroidHelper(content::WebContents* web_contents); |
| 26 friend class content::WebContentsUserData<ViewAndroidHelper>; | 22 friend class content::WebContentsUserData<ViewAndroidHelper>; |
| 27 | 23 |
| 28 // The owning view that has a hold of the current window. | 24 // The owning view that has a hold of the current window. |
| 29 ui::ViewAndroid* view_android_; | 25 ui::ViewAndroid* view_android_; |
| 30 | 26 |
| 31 DISALLOW_COPY_AND_ASSIGN(ViewAndroidHelper); | 27 DISALLOW_COPY_AND_ASSIGN(ViewAndroidHelper); |
| 32 }; | 28 }; |
| 33 | 29 |
| 34 #endif // CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ | 30 #endif // CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_ |
| OLD | NEW |