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

Side by Side Diff: blimp/client/android/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: Made sure to clear old control data 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_TOOLBAR_H_
6 #define BLIMP_CLIENT_ANDROID_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.Toolbar. This handles
17 // marshalling calls between Java and native. Specifically, this passes calls
18 // between Toolbar.java <=> content_lite's NavigationController layer.
19 class Toolbar {
20 public:
21 static bool RegisterJni(JNIEnv* env);
22
23 Toolbar(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
24
25 // Methods called from Java via JNI.
26 void Destroy(JNIEnv* env, jobject jobj);
27 void OnUrlTextEntered(JNIEnv* env, jobject jobj, jstring text);
28 void OnReloadPressed(JNIEnv* env, jobject jobj);
29 jboolean OnBackPressed(JNIEnv* env, jobject jobj);
30
31 // TODO(dtrainor): To be called by a the content lite NavigationController.
32 // Should probably be an overridden delegate method so the network code can be
33 // multi platform.
34 void OnNavigationStateChanged(const GURL* url,
35 const SkBitmap* favicon,
36 const std::string* title);
37
38 private:
39 virtual ~Toolbar();
40
41 // Reference to the Java object which owns this class.
42 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
43
44 DISALLOW_COPY_AND_ASSIGN(Toolbar);
45 };
46
47 } // namespace blimp
48
49 #endif // BLIMP_CLIENT_ANDROID_TOOLBAR_H_
OLDNEW
« no previous file with comments | « blimp/client/android/java/src/org/chromium/blimp/toolbar/UrlBar.java ('k') | blimp/client/android/toolbar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698