| 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/instant/instant_page.h" | 5 #include "chrome/browser/instant/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 "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont; | 48 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont; |
| 49 #endif | 49 #endif |
| 50 const gfx::Font& omnibox_font = | 50 const gfx::Font& omnibox_font = |
| 51 ui::ResourceBundle::GetSharedInstance().GetFont(font_style); | 51 ui::ResourceBundle::GetSharedInstance().GetFont(font_style); |
| 52 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName()); | 52 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName()); |
| 53 size_t omnibox_font_size = omnibox_font.GetFontSize(); | 53 size_t omnibox_font_size = omnibox_font.GetFontSize(); |
| 54 Send(new ChromeViewMsg_SearchBoxFontInformation( | 54 Send(new ChromeViewMsg_SearchBoxFontInformation( |
| 55 routing_id(), omnibox_font_name, omnibox_font_size)); | 55 routing_id(), omnibox_font_name, omnibox_font_size)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void InstantPage::GrantAccessFromOrigin(const GURL& origin_url) { |
| 59 DCHECK(origin_url.is_valid()); |
| 60 Send(new ChromeViewMsg_SearchBoxGrantAccessFromOrigin( |
| 61 routing_id(), origin_url)); |
| 62 } |
| 63 |
| 58 void InstantPage::DetermineIfPageSupportsInstant() { | 64 void InstantPage::DetermineIfPageSupportsInstant() { |
| 59 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); | 65 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); |
| 60 } | 66 } |
| 61 | 67 |
| 62 void InstantPage::SendAutocompleteResults( | 68 void InstantPage::SendAutocompleteResults( |
| 63 const std::vector<InstantAutocompleteResult>& results) { | 69 const std::vector<InstantAutocompleteResult>& results) { |
| 64 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); | 70 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); |
| 65 } | 71 } |
| 66 | 72 |
| 67 void InstantPage::UpOrDownKeyPressed(int count) { | 73 void InstantPage::UpOrDownKeyPressed(int count) { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 delegate_->DeleteMostVisitedItem(url); | 260 delegate_->DeleteMostVisitedItem(url); |
| 255 } | 261 } |
| 256 | 262 |
| 257 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) { | 263 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) { |
| 258 delegate_->UndoMostVisitedDeletion(url); | 264 delegate_->UndoMostVisitedDeletion(url); |
| 259 } | 265 } |
| 260 | 266 |
| 261 void InstantPage::OnUndoAllMostVisitedDeletions() { | 267 void InstantPage::OnUndoAllMostVisitedDeletions() { |
| 262 delegate_->UndoAllMostVisitedDeletions(); | 268 delegate_->UndoAllMostVisitedDeletions(); |
| 263 } | 269 } |
| OLD | NEW |