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

Side by Side Diff: blimp/client/android/blimp_toolbar.h

Issue 1422363008: Add a basic UI to the Android Blimp client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 5 years, 1 month 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
(Empty)
1 // Copyright 2015 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 BLIMP_CLIENT_ANDROID_BLIMP_TOOLBAR_H_
6 #define BLIMP_CLIENT_ANDROID_BLIMP_TOOLBAR_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/macros.h"
10
11 class GURL;
12 class SkBitmap;
13
14 namespace blimp {
15
16 // The native component of org.chromium.blimp.toolbar.BlimpToolbar. This
17 // handles marshalling calls between Java and native. Specifically, this passes
18 // calls between BlimpToolbar.java <=> content_lite's NavigationController
19 // layer.
20 class BlimpToolbar {
21 public:
22 static bool RegisterJni(JNIEnv* env);
23
24 BlimpToolbar(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
25
26 // Methods called from Java via JNI.
27 void Destroy(JNIEnv* env, jobject jobj);
28 void OnUrlTextEntered(JNIEnv* env, jobject jobj, jstring text);
29 void OnReloadPressed(JNIEnv* env, jobject jobj);
30 jboolean OnBackPressed(JNIEnv* env, jobject jobj);
31
32 // TODO(dtrainor): To be called by a the content lite NavigationController.
33 // Should probably be an overridden delegate method so the network code can be
34 // multi platform.
35 void OnNavigationStateChanged(const GURL* url,
36 const SkBitmap* favicon,
37 const std::string* title);
38
39 private:
40 virtual ~BlimpToolbar();
41
42 // Reference to the Java object which owns this class.
43 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
44
45 DISALLOW_COPY_AND_ASSIGN(BlimpToolbar);
46 };
47
48 } // namespace blimp
49
50 #endif // BLIMP_CLIENT_ANDROID_BLIMP_TOOLBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698