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

Side by Side Diff: chrome/browser/android/tab_base_android_impl.h

Issue 10968003: Add rendering support to the TestShell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nits Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_
6 #define CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_
7
8 #include <jni.h>
9
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/android/tab_android.h"
13
14 namespace browser_sync {
15 class SyncedTabDelegate;
16 }
17
18 namespace chrome {
19 namespace android {
20 class ChromeWebContentsDelegateAndroid;
21 }
22 }
23
24 namespace content {
25 class WebContents;
26 }
27
28 namespace WebKit {
29 class WebLayer;
30 }
31
32 class TabBaseAndroidImpl : public TabAndroid {
33 public:
34 TabBaseAndroidImpl(JNIEnv* env,
35 jobject obj,
36 content::WebContents* web_contents);
37 void Destroy(JNIEnv* env, jobject obj);
38
39 WebKit::WebLayer* tab_layer() const { return tab_layer_.get(); }
40
41 // --------------------------------------------------------------------------
42 // TabAndroid Methods
43 // --------------------------------------------------------------------------
44 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() OVERRIDE;
45
46 virtual void OnReceivedHttpAuthRequest(jobject auth_handler,
47 const string16& host,
48 const string16& realm) OVERRIDE;
49 virtual void ShowContextMenu(
50 const content::ContextMenuParams& params) OVERRIDE;
51
52 virtual void ShowCustomContextMenu(
53 const content::ContextMenuParams& params,
54 const base::Callback<void(int)>& callback) OVERRIDE;
55
56 virtual void ShowSelectFileDialog(
57 const base::android::ScopedJavaLocalRef<jobject>& select_file) OVERRIDE;
58
59 virtual void AddShortcutToBookmark(
60 const GURL& url, const string16& title, const SkBitmap& skbitmap,
sky 2012/09/25 15:57:39 each param on its own line.
David Trainor- moved to gerrit 2012/09/25 19:07:12 Done.
61 int r_value, int g_value, int b_value) OVERRIDE;
62
63 // Called when the common ExternalProtocolHandler wants to
64 // run the external protocol dialog.
65 virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE;
66
67 // Register the Tab's native methods through JNI.
68 static bool RegisterTabBaseAndroidImpl(JNIEnv* env);
69
70 // --------------------------------------------------------------------------
71 // Methods called from Java via JNI
72 // --------------------------------------------------------------------------
73 void InitWebContentsDelegate(JNIEnv* env,
74 jobject obj,
75 jobject web_contents_delegate);
76
77 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env,
78 jobject obj,
79 jstring url);
80
81 protected:
82 virtual ~TabBaseAndroidImpl();
83
84 private:
85 scoped_ptr<content::WebContents> web_contents_;
86 scoped_ptr<WebKit::WebLayer> tab_layer_;
87 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
88 web_contents_delegate_;
89
90 DISALLOW_COPY_AND_ASSIGN(TabBaseAndroidImpl);
91 };
92
93 #endif // CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698