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

Unified Diff: chrome/browser/views/location_bar/location_bar_view.cc

Issue 3105004: Adds support for showing the match preview on views. It's behind the (Closed)
Patch Set: Addressed review comments Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/views/location_bar/location_bar_view.cc b/chrome/browser/views/location_bar/location_bar_view.cc
index 7071b6736cc0ec827643fa50349dbbcc9649e13b..e03dcb7a5d3fd36b6f25f2e398af578e94e132e9 100644
--- a/chrome/browser/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/views/location_bar/location_bar_view.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/search_engines/template_url_model.h"
+#include "chrome/browser/tab_contents/match_preview.h"
#include "chrome/browser/view_ids.h"
#include "chrome/browser/views/browser_dialogs.h"
#include "chrome/browser/views/location_bar/content_setting_image_view.h"
@@ -711,6 +712,13 @@ void LocationBarView::OnChanged() {
location_entry_->GetIcon()));
Layout();
SchedulePaint();
+
+ if (MatchPreview::IsEnabled() && GetTabContents() &&
+ !profile_->IsOffTheRecord()) {
+ GURL url = location_entry_->model()->user_input_in_progress() ?
+ location_entry_->model()->CurrentURL() : GURL();
+ GetTabContents()->match_preview()->Update(url);
+ }
}
void LocationBarView::OnInputInProgress(bool in_progress) {
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698