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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 7841012: Get chrome to link 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/location_bar/location_bar_view.cc
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 99983)
+++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy)
@@ -428,8 +428,10 @@
suggested_text_view_->SetText(UTF16ToWide(text));
if (views::Widget::IsPureViews())
NOTIMPLEMENTED();
+#if !defined(USE_AURA)
else
suggested_text_view_->SetFont(GetOmniboxViewWin()->GetFont());
+#endif
AddChildView(suggested_text_view_);
} else if (suggested_text_view_->GetText() != UTF16ToWide(text)) {
suggested_text_view_->SetText(UTF16ToWide(text));
@@ -545,12 +547,14 @@
if (views::Widget::IsPureViews()) {
NOTIMPLEMENTED();
} else {
+#if !defined(USE_AURA)
RECT formatting_rect;
GetOmniboxViewWin()->GetRect(&formatting_rect);
RECT edit_bounds;
GetOmniboxViewWin()->GetClientRect(&edit_bounds);
max_edit_width = entry_width - formatting_rect.left -
(edit_bounds.right - formatting_rect.right);
+#endif
}
#else
int max_edit_width = entry_width;
@@ -674,6 +678,7 @@
if (views::Widget::IsPureViews()) {
NOTIMPLEMENTED();
} else {
+#if !defined(USE_AURA)
// TODO(sky): need to layout when the user changes caret position.
int suggested_text_width =
suggested_text_view_->GetPreferredSize().width();
@@ -692,6 +697,7 @@
suggested_text_width,
location_bounds.height());
}
+#endif
}
}
#endif
@@ -757,7 +763,7 @@
location_entry_->SelectAll(true);
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(USE_AURA)
bool LocationBarView::OnMousePressed(const views::MouseEvent& event) {
UINT msg;
if (event.IsLeftMouseButton()) {
@@ -989,7 +995,7 @@
}
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(USE_AURA)
void LocationBarView::OnMouseEvent(const views::MouseEvent& event, UINT msg) {
UINT flags = event.GetWindowsFlags();
gfx::Point screen_point(event.location());
@@ -1041,9 +1047,11 @@
return true;
}
+#if !defined(USE_AURA)
// If the caret is not at the end, then tab moves the caret to the end.
if (!views_omnibox && !GetOmniboxViewWin()->IsCaretAtEnd())
return true;
+#endif
// Tab while showing instant commits instant immediately.
// Return true so that focus traversal isn't attempted. The edit ends
@@ -1052,8 +1060,10 @@
return true;
}
+#if !defined(USE_AURA)
if (!views_omnibox)
return GetOmniboxViewWin()->SkipDefaultKeyEventProcessing(event);
+#endif
NOTIMPLEMENTED();
return false;
#else
@@ -1253,8 +1263,10 @@
!suggested_text_view_->GetText().empty();
}
+#if !defined(USE_AURA)
OmniboxViewWin* LocationBarView::GetOmniboxViewWin() {
CHECK(!views::Widget::IsPureViews());
return static_cast<OmniboxViewWin*>(location_entry_.get());
}
#endif
+#endif
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/native_constrained_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698