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

Side by Side Diff: chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc

Issue 68103008: Hide IME autocompletion when Omnibox popup closes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a comment. Created 7 years, 1 month 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/gtk/omnibox/omnibox_view_gtk.h" 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 return false; 575 return false;
576 576
577 StartUpdatingHighlightedText(); 577 StartUpdatingHighlightedText();
578 CharRange range(display_text.size(), user_text_length); 578 CharRange range(display_text.size(), user_text_length);
579 SetTextAndSelectedRange(display_text, range); 579 SetTextAndSelectedRange(display_text, range);
580 FinishUpdatingHighlightedText(); 580 FinishUpdatingHighlightedText();
581 TextChanged(); 581 TextChanged();
582 return true; 582 return true;
583 } 583 }
584 584
585 void OmniboxViewGtk::OnInlineAutocompleteTextCleared() {
586 }
587
585 void OmniboxViewGtk::OnRevertTemporaryText() { 588 void OmniboxViewGtk::OnRevertTemporaryText() {
586 StartUpdatingHighlightedText(); 589 StartUpdatingHighlightedText();
587 SetSelectedRange(saved_temporary_selection_); 590 SetSelectedRange(saved_temporary_selection_);
588 FinishUpdatingHighlightedText(); 591 FinishUpdatingHighlightedText();
589 // We got here because the user hit the Escape key. We explicitly don't call 592 // We got here because the user hit the Escape key. We explicitly don't call
590 // TextChanged(), since OmniboxPopupModel::ResetToDefaultMatch() has already 593 // TextChanged(), since OmniboxPopupModel::ResetToDefaultMatch() has already
591 // been called by now, and it would've called TextChanged() if it was 594 // been called by now, and it would've called TextChanged() if it was
592 // warranted. 595 // warranted.
593 } 596 }
594 597
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 void OmniboxViewGtk::AdjustVerticalAlignmentOfGrayTextView() { 2122 void OmniboxViewGtk::AdjustVerticalAlignmentOfGrayTextView() {
2120 // By default, GtkTextView layouts an anchored child widget just above the 2123 // By default, GtkTextView layouts an anchored child widget just above the
2121 // baseline, so we need to move the |gray_text_view_| down to make sure it 2124 // baseline, so we need to move the |gray_text_view_| down to make sure it
2122 // has the same baseline as the |text_view_|. 2125 // has the same baseline as the |text_view_|.
2123 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(gray_text_view_)); 2126 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(gray_text_view_));
2124 int height; 2127 int height;
2125 pango_layout_get_size(layout, NULL, &height); 2128 pango_layout_get_size(layout, NULL, &height);
2126 int baseline = pango_layout_get_baseline(layout); 2129 int baseline = pango_layout_get_baseline(layout);
2127 g_object_set(gray_text_anchor_tag_, "rise", baseline - height, NULL); 2130 g_object_set(gray_text_anchor_tag_, "rise", baseline - height, NULL);
2128 } 2131 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698