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

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: Removed unused icon 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 // To be called by a the content lite NavigationController. Should probably
nyquist 2015/11/09 01:58:45 Nit: Should this be a TODO?
David Trainor- moved to gerrit 2015/11/09 17:17:45 Done.
33 // be an overridden delegate method so the network code can be multi platform.
34 void OnNavigationStateChanged(const GURL* url,
35 const SkBitmap* favicon,
36 const std::string* title);
37
38 private:
39 virtual ~BlimpToolbar();
40
41 // Reference to the Java object which owns this class.
42 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
43
44 DISALLOW_COPY_AND_ASSIGN(BlimpToolbar);
45 };
46
47 } // namespace blimp
48
49 #endif // BLIMP_CLIENT_ANDROID_BLIMP_TOOLBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698