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

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

Issue 2885433003: VR: Implement Omnibox input targeting. (Closed)
Patch Set: 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 c85e806f942fad9de35bc9ee0659b085bc58f37e..cb9e2f92e6d8d889c043568226b0b04213c0d80e 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.h
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.h
@@ -12,6 +12,7 @@
#include "url/gurl.h"
namespace gfx {
+class PointF;
class RenderText;
} // namespace gfx
@@ -20,7 +21,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();
@@ -32,9 +34,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;
cjgrant 2017/05/16 14:07:23 HitsUrlBar (matches style guide and class name)
mthiesse 2017/05/16 18:11:02 Done.
+
private:
void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override;
float ToPixels(float meters) const;
+ bool HitsRightTransparentRegion(const gfx::PointF& position) const;
gfx::SizeF size_;
int security_level_;

Powered by Google App Engine
This is Rietveld 408576698