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

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

Issue 12335141: Move c/b/ui/search/search.* to c/b/instant/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 9 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
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>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/strings/utf_string_conversion_utils.h" 14 #include "base/strings/utf_string_conversion_utils.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/app/chrome_command_ids.h" 16 #include "chrome/app/chrome_command_ids.h"
17 #include "chrome/browser/autocomplete/autocomplete_input.h" 17 #include "chrome/browser/autocomplete/autocomplete_input.h"
18 #include "chrome/browser/autocomplete/autocomplete_match.h" 18 #include "chrome/browser/autocomplete/autocomplete_match.h"
19 #include "chrome/browser/bookmarks/bookmark_node_data.h" 19 #include "chrome/browser/bookmarks/bookmark_node_data.h"
20 #include "chrome/browser/command_updater.h" 20 #include "chrome/browser/command_updater.h"
21 #include "chrome/browser/defaults.h" 21 #include "chrome/browser/defaults.h"
22 #include "chrome/browser/instant/search.h"
22 #include "chrome/browser/platform_util.h" 23 #include "chrome/browser/platform_util.h"
23 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/ui/browser.h" 25 #include "chrome/browser/ui/browser.h"
25 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 26 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
26 #include "chrome/browser/ui/gtk/gtk_util.h" 27 #include "chrome/browser/ui/gtk/gtk_util.h"
27 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 28 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
28 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h" 29 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h"
29 #include "chrome/browser/ui/gtk/view_id_util.h" 30 #include "chrome/browser/ui/gtk/view_id_util.h"
30 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 31 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
31 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 32 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
32 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 33 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
33 #include "chrome/browser/ui/search/search.h"
34 #include "chrome/browser/ui/tabs/tab_strip_model.h" 34 #include "chrome/browser/ui/tabs/tab_strip_model.h"
35 #include "chrome/browser/ui/toolbar/toolbar_model.h" 35 #include "chrome/browser/ui/toolbar/toolbar_model.h"
36 #include "chrome/common/chrome_notification_types.h" 36 #include "chrome/common/chrome_notification_types.h"
37 #include "content/public/browser/notification_source.h" 37 #include "content/public/browser/notification_source.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "googleurl/src/gurl.h" 39 #include "googleurl/src/gurl.h"
40 #include "grit/generated_resources.h" 40 #include "grit/generated_resources.h"
41 #include "net/base/escape.h" 41 #include "net/base/escape.h"
42 #include "third_party/undoview/undo_view.h" 42 #include "third_party/undoview/undo_view.h"
43 #include "ui/base/clipboard/scoped_clipboard_writer.h" 43 #include "ui/base/clipboard/scoped_clipboard_writer.h"
(...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 void OmniboxViewGtk::AdjustVerticalAlignmentOfInstantView() { 2144 void OmniboxViewGtk::AdjustVerticalAlignmentOfInstantView() {
2145 // By default, GtkTextView layouts an anchored child widget just above the 2145 // By default, GtkTextView layouts an anchored child widget just above the
2146 // baseline, so we need to move the |instant_view_| down to make sure it 2146 // baseline, so we need to move the |instant_view_| down to make sure it
2147 // has the same baseline as the |text_view_|. 2147 // has the same baseline as the |text_view_|.
2148 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_)); 2148 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_));
2149 int height; 2149 int height;
2150 pango_layout_get_size(layout, NULL, &height); 2150 pango_layout_get_size(layout, NULL, &height);
2151 int baseline = pango_layout_get_baseline(layout); 2151 int baseline = pango_layout_get_baseline(layout);
2152 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL); 2152 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL);
2153 } 2153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698