OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 5 #ifndef CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
6 #define CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 6 #define CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 |
| 11 #include <memory> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/android/jni_string.h" | 14 #include "base/android/jni_string.h" |
13 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
14 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
15 #include "base/command_line.h" | 17 #include "base/command_line.h" |
16 #include "base/macros.h" | 18 #include "base/macros.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
21 #include "content/public/browser/web_contents_delegate.h" | 22 #include "content/public/browser/web_contents_delegate.h" |
22 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
23 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
24 #include "ui/gfx/geometry/size.h" | 25 #include "ui/gfx/geometry/size.h" |
25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
26 | 27 |
27 class GURL; | 28 class GURL; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 75 |
75 // content::WebContentsObserver implementation: | 76 // content::WebContentsObserver implementation: |
76 void RenderProcessGone(base::TerminationStatus status) override; | 77 void RenderProcessGone(base::TerminationStatus status) override; |
77 | 78 |
78 private: | 79 private: |
79 explicit CastWindowAndroid(content::BrowserContext* browser_context); | 80 explicit CastWindowAndroid(content::BrowserContext* browser_context); |
80 void Initialize(); | 81 void Initialize(); |
81 | 82 |
82 content::BrowserContext* browser_context_; | 83 content::BrowserContext* browser_context_; |
83 base::android::ScopedJavaGlobalRef<jobject> window_java_; | 84 base::android::ScopedJavaGlobalRef<jobject> window_java_; |
84 scoped_ptr<content::WebContents> web_contents_; | 85 std::unique_ptr<content::WebContents> web_contents_; |
85 scoped_ptr<CastContentWindow> content_window_; | 86 std::unique_ptr<CastContentWindow> content_window_; |
86 | 87 |
87 base::WeakPtrFactory<CastWindowAndroid> weak_factory_; | 88 base::WeakPtrFactory<CastWindowAndroid> weak_factory_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); | 90 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace shell | 93 } // namespace shell |
93 } // namespace chromecast | 94 } // namespace chromecast |
94 | 95 |
95 #endif // CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 96 #endif // CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
OLD | NEW |