OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/search/instant_page.h" | 5 #include "chrome/browser/ui/search/instant_page.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 void InstantPage::SetOmniboxBounds(const gfx::Rect& bounds) { | 46 void InstantPage::SetOmniboxBounds(const gfx::Rect& bounds) { |
47 Send(new ChromeViewMsg_SearchBoxMarginChange( | 47 Send(new ChromeViewMsg_SearchBoxMarginChange( |
48 routing_id(), bounds.x(), bounds.width())); | 48 routing_id(), bounds.x(), bounds.width())); |
49 } | 49 } |
50 | 50 |
51 void InstantPage::InitializeFonts() { | 51 void InstantPage::InitializeFonts() { |
52 #if defined(OS_MACOSX) | 52 #if defined(OS_MACOSX) |
53 // This value should be kept in sync with OmniboxViewMac::GetFieldFont. | 53 // This value should be kept in sync with OmniboxViewMac::GetFieldFont. |
54 const gfx::Font omnibox_font("arial", 16); | 54 const gfx::Font omnibox_font("Helvetica Neue", 16); |
55 #else | 55 #else |
56 const gfx::Font& omnibox_font = | 56 const gfx::Font& omnibox_font = |
57 ui::ResourceBundle::GetSharedInstance().GetFont( | 57 ui::ResourceBundle::GetSharedInstance().GetFont( |
58 ui::ResourceBundle::MediumFont); | 58 ui::ResourceBundle::MediumFont); |
59 #endif | 59 #endif |
60 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName()); | 60 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName()); |
61 size_t omnibox_font_size = omnibox_font.GetFontSize(); | 61 size_t omnibox_font_size = omnibox_font.GetFontSize(); |
62 Send(new ChromeViewMsg_SearchBoxFontInformation( | 62 Send(new ChromeViewMsg_SearchBoxFontInformation( |
63 routing_id(), omnibox_font_name, omnibox_font_size)); | 63 routing_id(), omnibox_font_name, omnibox_font_size)); |
64 } | 64 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 delegate_->DeleteMostVisitedItem(restricted_id); | 251 delegate_->DeleteMostVisitedItem(restricted_id); |
252 } | 252 } |
253 | 253 |
254 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { | 254 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { |
255 delegate_->UndoMostVisitedDeletion(restricted_id); | 255 delegate_->UndoMostVisitedDeletion(restricted_id); |
256 } | 256 } |
257 | 257 |
258 void InstantPage::OnUndoAllMostVisitedDeletions() { | 258 void InstantPage::OnUndoAllMostVisitedDeletions() { |
259 delegate_->UndoAllMostVisitedDeletions(); | 259 delegate_->UndoAllMostVisitedDeletions(); |
260 } | 260 } |
OLD | NEW |