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

Unified Diff: chrome/browser/android/vr_shell/textures/url_bar_texture.h

Issue 2885433003: VR: Implement Omnibox input targeting. (Closed)
Patch Set: rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/textures/url_bar_texture.h
diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture.h b/chrome/browser/android/vr_shell/textures/url_bar_texture.h
index cf0a6ab28e0c7c336bdd4001ce8e11d51c14e8ec..30bdb655c5f236e534e35496a9f557eaadc8ea71 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.h
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.h
@@ -13,6 +13,7 @@
#include "url/gurl.h"
namespace gfx {
+class PointF;
class RenderText;
} // namespace gfx
@@ -21,7 +22,8 @@ namespace vr_shell {
class UrlBarTexture : public UiTexture {
public:
enum DrawFlags {
- FLAG_HOVER = 1 << 0,
+ FLAG_BACK_HOVER = 1 << 0,
+ FLAG_BACK_DOWN = 1 << 1,
};
UrlBarTexture();
@@ -33,9 +35,13 @@ class UrlBarTexture : public UiTexture {
void SetURL(const GURL& gurl);
void SetSecurityLevel(int level);
+ bool HitsBackButton(const gfx::PointF& position) const;
+ bool HitsUrlBar(const gfx::PointF& position) const;
+
private:
void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override;
float ToPixels(float meters) const;
+ bool HitsTransparentRegion(const gfx::PointF& meters, bool left) const;
gfx::SizeF size_;
int security_level_;

Powered by Google App Engine
This is Rietveld 408576698