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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android ifx Created 6 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/omnibox/omnibox_edit_model.h" 5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 return (focus_source_ == FAKEBOX) ? 1432 return (focus_source_ == FAKEBOX) ?
1433 AutocompleteInput::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS : 1433 AutocompleteInput::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS :
1434 AutocompleteInput::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS; 1434 AutocompleteInput::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS;
1435 } 1435 }
1436 const GURL& gurl = delegate_->GetURL(); 1436 const GURL& gurl = delegate_->GetURL();
1437 if (!gurl.is_valid()) 1437 if (!gurl.is_valid())
1438 return AutocompleteInput::INVALID_SPEC; 1438 return AutocompleteInput::INVALID_SPEC;
1439 const std::string& url = gurl.spec(); 1439 const std::string& url = gurl.spec();
1440 if (url == chrome::kChromeUINewTabURL) 1440 if (url == chrome::kChromeUINewTabURL)
1441 return AutocompleteInput::NTP; 1441 return AutocompleteInput::NTP;
1442 if (url == content::kAboutBlankURL) 1442 if (url == url::kAboutBlankURL)
1443 return AutocompleteInput::BLANK; 1443 return AutocompleteInput::BLANK;
1444 if (url == profile()->GetPrefs()->GetString(prefs::kHomePage)) 1444 if (url == profile()->GetPrefs()->GetString(prefs::kHomePage))
1445 return AutocompleteInput::HOME_PAGE; 1445 return AutocompleteInput::HOME_PAGE;
1446 if (controller_->GetToolbarModel()->WouldPerformSearchTermReplacement(true)) 1446 if (controller_->GetToolbarModel()->WouldPerformSearchTermReplacement(true))
1447 return AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT; 1447 return AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
1448 if (delegate_->IsSearchResultsPage()) 1448 if (delegate_->IsSearchResultsPage())
1449 return AutocompleteInput::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT; 1449 return AutocompleteInput::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT;
1450 return AutocompleteInput::OTHER; 1450 return AutocompleteInput::OTHER;
1451 } 1451 }
1452 1452
(...skipping 14 matching lines...) Expand all
1467 // Update state and notify view if the omnibox has focus and the caret 1467 // Update state and notify view if the omnibox has focus and the caret
1468 // visibility changed. 1468 // visibility changed.
1469 const bool was_caret_visible = is_caret_visible(); 1469 const bool was_caret_visible = is_caret_visible();
1470 focus_state_ = state; 1470 focus_state_ = state;
1471 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1471 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1472 is_caret_visible() != was_caret_visible) 1472 is_caret_visible() != was_caret_visible)
1473 view_->ApplyCaretVisibility(); 1473 view_->ApplyCaretVisibility();
1474 1474
1475 delegate_->OnFocusChanged(focus_state_, reason); 1475 delegate_->OnFocusChanged(focus_state_, reason);
1476 } 1476 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698