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

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: Yet another 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/instant/instant_page.h ('k') | chrome/browser/instant/instant_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont; 49 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont;
50 #endif 50 #endif
51 const gfx::Font& omnibox_font = 51 const gfx::Font& omnibox_font =
52 ui::ResourceBundle::GetSharedInstance().GetFont(font_style); 52 ui::ResourceBundle::GetSharedInstance().GetFont(font_style);
53 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName()); 53 string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName());
54 size_t omnibox_font_size = omnibox_font.GetFontSize(); 54 size_t omnibox_font_size = omnibox_font.GetFontSize();
55 Send(new ChromeViewMsg_SearchBoxFontInformation( 55 Send(new ChromeViewMsg_SearchBoxFontInformation(
56 routing_id(), omnibox_font_name, omnibox_font_size)); 56 routing_id(), omnibox_font_name, omnibox_font_size));
57 } 57 }
58 58
59 void InstantPage::GrantChromeSearchAccessFromOrigin(const GURL& origin_url) {
60 DCHECK(origin_url.is_valid());
61 Send(new ChromeViewMsg_SearchBoxGrantChromeSearchAccessFromOrigin(
62 routing_id(), origin_url));
63 }
64
59 void InstantPage::DetermineIfPageSupportsInstant() { 65 void InstantPage::DetermineIfPageSupportsInstant() {
60 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); 66 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id()));
61 } 67 }
62 68
63 void InstantPage::SendAutocompleteResults( 69 void InstantPage::SendAutocompleteResults(
64 const std::vector<InstantAutocompleteResult>& results) { 70 const std::vector<InstantAutocompleteResult>& results) {
65 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); 71 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results));
66 } 72 }
67 73
68 void InstantPage::UpOrDownKeyPressed(int count) { 74 void InstantPage::UpOrDownKeyPressed(int count) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 delegate_->DeleteMostVisitedItem(url); 274 delegate_->DeleteMostVisitedItem(url);
269 } 275 }
270 276
271 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) { 277 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) {
272 delegate_->UndoMostVisitedDeletion(url); 278 delegate_->UndoMostVisitedDeletion(url);
273 } 279 }
274 280
275 void InstantPage::OnUndoAllMostVisitedDeletions() { 281 void InstantPage::OnUndoAllMostVisitedDeletions() {
276 delegate_->UndoAllMostVisitedDeletions(); 282 delegate_->UndoAllMostVisitedDeletions();
277 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_page.h ('k') | chrome/browser/instant/instant_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698