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

Unified Diff: chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/ui/views/compact_nav/compact_location_bar_view_host.cc
===================================================================
--- chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (revision 99764)
+++ chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (working copy)
@@ -47,12 +47,17 @@
// An mouse event observer to detect a mouse click on
// BrowserView's content area and hide the location bar.
-class MouseObserver : public MessageLoopForUI::Observer {
+class MouseObserver
+#if !defined(USE_AURA)
+ : public MessageLoopForUI::Observer
+#endif
+ {
public:
MouseObserver(CompactLocationBarViewHost* host, BrowserView* view);
~MouseObserver();
// MessageLoopForUI::Observer overrides.
+#if !defined(USE_AURA)
#if defined(OS_WIN)
virtual void WillProcessMessage(const MSG& native_event) OVERRIDE;
virtual void DidProcessMessage(const MSG& native_event) OVERRIDE;
@@ -60,6 +65,7 @@
virtual void WillProcessEvent(GdkEvent* native_event) OVERRIDE;
virtual void DidProcessEvent(GdkEvent* native_event) OVERRIDE;
#endif
+#endif
void Observe(MessageLoopForUI* loop);
void StopObserving(MessageLoopForUI* loop);
@@ -100,6 +106,7 @@
StopObserving(MessageLoopForUI::current());
}
+#if !defined(USE_AURA)
#if defined(OS_WIN)
void MouseObserver::WillProcessMessage(const MSG& native_event) {}
void MouseObserver::DidProcessMessage(const MSG& native_event) {
@@ -118,19 +125,24 @@
host_->Hide(true);
}
}
+#endif
void MouseObserver::Observe(MessageLoopForUI* loop) {
+#if !defined(USE_AURA)
if (!observing_) {
loop->AddObserver(this);
observing_ = true;
}
+#endif
}
void MouseObserver::StopObserving(MessageLoopForUI* loop) {
+#if !defined(USE_AURA)
if (observing_) {
loop->RemoveObserver(this);
observing_ = false;
}
+#endif
}
bool MouseObserver::IsMouseEvent(const views::NativeEvent& native_event) {
@@ -150,7 +162,11 @@
// Then, with a GetTopLevel receiving a NativeWindow, we could do this in a
// platform independent way.
bool MouseObserver::IsSameTopLevelWindow(views::NativeEvent native_event) {
-#if defined(OS_WIN)
+#if defined(USE_AURA)
+ // TODO(beng):
+ NOTIMPLEMENTED();
+ return false;
+#elif defined(OS_WIN)
return platform_util::GetTopLevel(native_event.hwnd) == top_level_window_;
#elif defined(OS_LINUX)
return gdk_window_get_toplevel(
« no previous file with comments | « chrome/browser/ui/views/collected_cookies_win.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698