OLD | NEW |
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 "components/omnibox/browser/omnibox_edit_model.h" | 5 #include "components/omnibox/browser/omnibox_edit_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
| 12 #include "base/macros.h" |
12 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
13 #include "base/metrics/user_metrics.h" | 14 #include "base/metrics/user_metrics.h" |
14 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
18 #include "components/bookmarks/browser/bookmark_model.h" | 19 #include "components/bookmarks/browser/bookmark_model.h" |
19 #include "components/metrics/proto/omnibox_event.pb.h" | 20 #include "components/metrics/proto/omnibox_event.pb.h" |
20 #include "components/omnibox/browser/autocomplete_classifier.h" | 21 #include "components/omnibox/browser/autocomplete_classifier.h" |
21 #include "components/omnibox/browser/autocomplete_match_type.h" | 22 #include "components/omnibox/browser/autocomplete_match_type.h" |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 // Update state and notify view if the omnibox has focus and the caret | 1460 // Update state and notify view if the omnibox has focus and the caret |
1460 // visibility changed. | 1461 // visibility changed. |
1461 const bool was_caret_visible = is_caret_visible(); | 1462 const bool was_caret_visible = is_caret_visible(); |
1462 focus_state_ = state; | 1463 focus_state_ = state; |
1463 if (focus_state_ != OMNIBOX_FOCUS_NONE && | 1464 if (focus_state_ != OMNIBOX_FOCUS_NONE && |
1464 is_caret_visible() != was_caret_visible) | 1465 is_caret_visible() != was_caret_visible) |
1465 view_->ApplyCaretVisibility(); | 1466 view_->ApplyCaretVisibility(); |
1466 | 1467 |
1467 client_->OnFocusChanged(focus_state_, reason); | 1468 client_->OnFocusChanged(focus_state_, reason); |
1468 } | 1469 } |
OLD | NEW |