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

Side by Side Diff: chrome/browser/ui/search/instant_page.cc

Issue 13905008: Merge local_omnibox_popup into local_ntp. Render the Google logo and fakebox if Google is the sear… (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Respond to comments. Created 7 years, 8 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
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/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"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/font.h" 12 #include "ui/gfx/font.h"
13 13
14 InstantPage::Delegate::~Delegate() { 14 InstantPage::Delegate::~Delegate() {
15 } 15 }
16 16
17 InstantPage::~InstantPage() { 17 InstantPage::~InstantPage() {
18 } 18 }
19 19
20 bool InstantPage::IsLocalNTP() const { 20 bool InstantPage::IsLocalNTP() const {
21 return contents() && 21 return contents() &&
22 contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl); 22 (contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl) ||
23 contents()->GetURL() == GURL(chrome::kChromeSearchLocalGoogleNtpUrl));
23 } 24 }
24 25
25 bool InstantPage::IsLocalOverlay() const { 26 bool InstantPage::IsLocalOverlay() const {
26 return contents() && 27 return contents() &&
27 contents()->GetURL() == GURL(chrome::kChromeSearchLocalOmniboxPopupURL); 28 contents()->GetURL() == GURL(chrome::kChromeSearchLocalOmniboxPopupURL);
28 } 29 }
29 30
30 void InstantPage::Update(const string16& text, 31 void InstantPage::Update(const string16& text,
31 size_t selection_start, 32 size_t selection_start,
32 size_t selection_end, 33 size_t selection_end,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 delegate_->DeleteMostVisitedItem(restricted_id); 255 delegate_->DeleteMostVisitedItem(restricted_id);
255 } 256 }
256 257
257 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { 258 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) {
258 delegate_->UndoMostVisitedDeletion(restricted_id); 259 delegate_->UndoMostVisitedDeletion(restricted_id);
259 } 260 }
260 261
261 void InstantPage::OnUndoAllMostVisitedDeletions() { 262 void InstantPage::OnUndoAllMostVisitedDeletions() {
262 delegate_->UndoAllMostVisitedDeletions(); 263 delegate_->UndoAllMostVisitedDeletions();
263 } 264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698