| 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 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 void InstantPage::Cancel(const string16& text) { | 31 void InstantPage::Cancel(const string16& text) { |
| 32 Send(new ChromeViewMsg_SearchBoxCancel(routing_id(), text)); | 32 Send(new ChromeViewMsg_SearchBoxCancel(routing_id(), text)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void InstantPage::SetPopupBounds(const gfx::Rect& bounds) { | 35 void InstantPage::SetPopupBounds(const gfx::Rect& bounds) { |
| 36 Send(new ChromeViewMsg_SearchBoxPopupResize(routing_id(), bounds)); | 36 Send(new ChromeViewMsg_SearchBoxPopupResize(routing_id(), bounds)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void InstantPage::SetMarginSize(const int start, const int end) { | 39 void InstantPage::SetOmniboxBounds(const gfx::Rect& bounds) { |
| 40 Send(new ChromeViewMsg_SearchBoxMarginChange(routing_id(), start, end)); | 40 Send(new ChromeViewMsg_SearchBoxMarginChange( |
| 41 routing_id(), bounds.x(), bounds.width())); |
| 41 } | 42 } |
| 42 | 43 |
| 43 void InstantPage::InitializeFonts() { | 44 void InstantPage::InitializeFonts() { |
| 44 // TODO(sail) Remove this once the Mac omnibox font size is updated. | 45 // TODO(sail) Remove this once the Mac omnibox font size is updated. |
| 45 #if defined(OS_MACOSX) | 46 #if defined(OS_MACOSX) |
| 46 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::BaseFont; | 47 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::BaseFont; |
| 47 #else | 48 #else |
| 48 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont; | 49 ui::ResourceBundle::FontStyle font_style = ui::ResourceBundle::MediumFont; |
| 49 #endif | 50 #endif |
| 50 const gfx::Font& omnibox_font = | 51 const gfx::Font& omnibox_font = |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 delegate_->DeleteMostVisitedItem(url); | 255 delegate_->DeleteMostVisitedItem(url); |
| 255 } | 256 } |
| 256 | 257 |
| 257 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) { | 258 void InstantPage::OnUndoMostVisitedDeletion(const GURL& url) { |
| 258 delegate_->UndoMostVisitedDeletion(url); | 259 delegate_->UndoMostVisitedDeletion(url); |
| 259 } | 260 } |
| 260 | 261 |
| 261 void InstantPage::OnUndoAllMostVisitedDeletions() { | 262 void InstantPage::OnUndoAllMostVisitedDeletions() { |
| 262 delegate_->UndoAllMostVisitedDeletions(); | 263 delegate_->UndoAllMostVisitedDeletions(); |
| 263 } | 264 } |
| OLD | NEW |