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

Side by Side Diff: chrome/browser/instant/instant_page.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Charlie's comments. 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698