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

Side by Side Diff: chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h" 5 #include "chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void MouseObserver::StopObserving(MessageLoopForUI* loop) { 139 void MouseObserver::StopObserving(MessageLoopForUI* loop) {
140 #if !defined(USE_AURA) 140 #if !defined(USE_AURA)
141 if (observing_) { 141 if (observing_) {
142 loop->RemoveObserver(this); 142 loop->RemoveObserver(this);
143 observing_ = false; 143 observing_ = false;
144 } 144 }
145 #endif 145 #endif
146 } 146 }
147 147
148 bool MouseObserver::IsMouseEvent(const views::NativeEvent& native_event) { 148 bool MouseObserver::IsMouseEvent(const views::NativeEvent& native_event) {
149 #if defined(OS_WIN) 149 #if defined(OS_WIN) || defined(USE_AURA)
150 return views::IsClientMouseEvent(native_event) || 150 return views::IsClientMouseEvent(native_event) ||
151 views::IsNonClientMouseEvent(native_event); 151 views::IsNonClientMouseEvent(native_event);
152 #elif defined(OS_LINUX) 152 #elif defined(OS_LINUX)
153 return native_event->type == GDK_MOTION_NOTIFY || 153 return native_event->type == GDK_MOTION_NOTIFY ||
154 native_event->type == GDK_BUTTON_PRESS || 154 native_event->type == GDK_BUTTON_PRESS ||
155 native_event->type == GDK_2BUTTON_PRESS || 155 native_event->type == GDK_2BUTTON_PRESS ||
156 native_event->type == GDK_3BUTTON_PRESS || 156 native_event->type == GDK_3BUTTON_PRESS ||
157 native_event->type == GDK_BUTTON_RELEASE; 157 native_event->type == GDK_BUTTON_RELEASE;
158 #endif 158 #endif
159 } 159 }
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 bool CompactLocationBarViewHost::IsCurrentTabIndex(int index) { 544 bool CompactLocationBarViewHost::IsCurrentTabIndex(int index) {
545 return current_tab_model_index_ == index; 545 return current_tab_model_index_ == index;
546 } 546 }
547 547
548 bool CompactLocationBarViewHost::IsCurrentTab(TabContents* contents) { 548 bool CompactLocationBarViewHost::IsCurrentTab(TabContents* contents) {
549 TabStripModel* tab_strip_model = browser_view()->browser()->tabstrip_model(); 549 TabStripModel* tab_strip_model = browser_view()->browser()->tabstrip_model();
550 return tab_strip_model->ContainsIndex(current_tab_model_index_) && 550 return tab_strip_model->ContainsIndex(current_tab_model_index_) &&
551 tab_strip_model->GetTabContentsAt(current_tab_model_index_)-> 551 tab_strip_model->GetTabContentsAt(current_tab_model_index_)->
552 tab_contents() == contents; 552 tab_contents() == contents;
553 } 553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698