Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: chromecast/shell/browser/android/cast_window_android.h

Issue 566963003: Chromecast Android shell improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style nits Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ 5 #ifndef CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_
6 #define CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ 6 #define CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const GURL& url); 43 const GURL& url);
44 44
45 virtual ~CastWindowAndroid(); 45 virtual ~CastWindowAndroid();
46 46
47 void LoadURL(const GURL& url); 47 void LoadURL(const GURL& url);
48 void Close(); 48 void Close();
49 49
50 // Registers the JNI methods for CastWindowAndroid. 50 // Registers the JNI methods for CastWindowAndroid.
51 static bool RegisterJni(JNIEnv* env); 51 static bool RegisterJni(JNIEnv* env);
52 52
53 // WebContentsDelegate implementation. 53 // content::WebContentsDelegate implementation:
54 virtual void AddNewContents(content::WebContents* source, 54 virtual void AddNewContents(content::WebContents* source,
55 content::WebContents* new_contents, 55 content::WebContents* new_contents,
56 WindowOpenDisposition disposition, 56 WindowOpenDisposition disposition,
57 const gfx::Rect& initial_pos, 57 const gfx::Rect& initial_pos,
58 bool user_gesture, 58 bool user_gesture,
59 bool* was_blocked) OVERRIDE; 59 bool* was_blocked) OVERRIDE;
60 virtual void CloseContents(content::WebContents* source) OVERRIDE; 60 virtual void CloseContents(content::WebContents* source) OVERRIDE;
61 virtual bool CanOverscrollContent() const OVERRIDE; 61 virtual bool CanOverscrollContent() const OVERRIDE;
62 virtual bool AddMessageToConsole(content::WebContents* source, 62 virtual bool AddMessageToConsole(content::WebContents* source,
63 int32 level, 63 int32 level,
64 const base::string16& message, 64 const base::string16& message,
65 int32 line_no, 65 int32 line_no,
66 const base::string16& source_id) OVERRIDE; 66 const base::string16& source_id) OVERRIDE;
67 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; 67 virtual void ActivateContents(content::WebContents* contents) OVERRIDE;
68 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; 68 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE;
69 69
70 // content::WebContentsObserver implementation:
71 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
72
70 private: 73 private:
71 explicit CastWindowAndroid(content::WebContents* web_contents); 74 explicit CastWindowAndroid(content::WebContents* web_contents);
72 75
73 // Helper to create a new CastWindowAndroid given a newly created WebContents. 76 // Helper to create a new CastWindowAndroid given a newly created WebContents.
74 static CastWindowAndroid* CreateCastWindowAndroid( 77 static CastWindowAndroid* CreateCastWindowAndroid(
75 content::WebContents* web_contents, 78 content::WebContents* web_contents,
76 const gfx::Size& initial_size); 79 const gfx::Size& initial_size);
77 80
78 base::android::ScopedJavaGlobalRef<jobject> java_object_; 81 base::android::ScopedJavaGlobalRef<jobject> java_object_;
79 scoped_ptr<content::WebContents> web_contents_; 82 scoped_ptr<content::WebContents> web_contents_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); 84 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid);
82 }; 85 };
83 86
84 } // namespace shell 87 } // namespace shell
85 } // namespace chromecast 88 } // namespace chromecast
86 89
87 #endif // CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ 90 #endif // CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_
OLDNEW
« no previous file with comments | « chromecast/shell/app/cast_main_delegate.cc ('k') | chromecast/shell/browser/android/cast_window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698