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

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

Issue 10810062: Moving common code into OmniboxView from OmniboxView* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More win fixes Created 8 years, 5 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
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 424f5c5e50ca62297b50c809cf333cb25e92f917..6ec5c1ec271c15f7c979d7604a697a96660c1d59 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -539,7 +539,7 @@ void LocationBarView::SetInstantSuggestion(const string16& text,
// Don't show the suggested text if inline autocomplete is prevented.
if (!text.empty()) {
if (!suggested_text_view_) {
- suggested_text_view_ = new SuggestedTextView(location_entry_->model());
+ suggested_text_view_ = new SuggestedTextView(location_entry_->GetModel());
suggested_text_view_->SetText(text);
suggested_text_view_->SetFont(location_entry_->GetFont());
AddChildView(suggested_text_view_);
@@ -636,8 +636,8 @@ void LocationBarView::Layout() {
location_icon_view_->SetVisible(false);
ev_bubble_view_->SetVisible(false);
- const string16 keyword(location_entry_->model()->keyword());
- const bool is_keyword_hint(location_entry_->model()->is_keyword_hint());
+ const string16 keyword(location_entry_->GetModel()->keyword());
+ const bool is_keyword_hint(location_entry_->GetModel()->is_keyword_hint());
const bool show_selected_keyword = !keyword.empty() && !is_keyword_hint;
if (show_selected_keyword) {
// Assume the keyword might be hidden.
@@ -1219,7 +1219,7 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(
const views::KeyEvent& event) {
#if defined(OS_WIN)
if (views::FocusManager::IsTabTraversalKeyEvent(event)) {
- if (location_entry_->model()->popup_model()->IsOpen()) {
+ if (location_entry_->GetModel()->popup_model()->IsOpen()) {
// Return true so that the edit sees the tab and moves the selection.
return true;
}
@@ -1231,7 +1231,7 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(
// Tab while showing instant commits instant immediately.
// Return true so that focus traversal isn't attempted. The edit ends
// up doing nothing in this case.
- if (location_entry_->model()->AcceptCurrentInstantPreview())
+ if (location_entry_->GetModel()->AcceptCurrentInstantPreview())
return true;
}
@@ -1263,7 +1263,7 @@ void LocationBarView::GetAccessibleState(ui::AccessibleViewState* state) {
}
bool LocationBarView::HasFocus() const {
- return location_entry_->model()->has_focus();
+ return location_entry_->GetModel()->has_focus();
}
void LocationBarView::WriteDragDataForView(views::View* sender,
@@ -1316,7 +1316,7 @@ void LocationBarView::ShowFirstRunBubble() {
void LocationBarView::SetSuggestedText(const string16& text,
InstantCompleteBehavior behavior) {
- location_entry_->model()->SetSuggestedText(text, behavior);
+ location_entry_->GetModel()->SetSuggestedText(text, behavior);
}
string16 LocationBarView::GetInputString() const {
@@ -1332,7 +1332,7 @@ content::PageTransition LocationBarView::GetPageTransition() const {
}
void LocationBarView::AcceptInput() {
- location_entry_->model()->AcceptInput(CURRENT_TAB, false);
+ location_entry_->GetModel()->AcceptInput(CURRENT_TAB, false);
}
void LocationBarView::FocusLocation(bool select_all) {

Powered by Google App Engine
This is Rietveld 408576698