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

Unified Diff: chrome/browser/find_bar_controller.cc

Issue 206035: Support the OS X find pasteboard on OS X. (Closed)
Patch Set: foo Created 11 years, 3 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
Index: chrome/browser/find_bar_controller.cc
diff --git a/chrome/browser/find_bar_controller.cc b/chrome/browser/find_bar_controller.cc
index 17fb22c472b0d4aed0f3f62aae66f1144c75b4c7..bef7273a70191e07e399e069062d8aacf5d1b245 100644
--- a/chrome/browser/find_bar_controller.cc
+++ b/chrome/browser/find_bar_controller.cc
@@ -75,6 +75,7 @@ void FindBarController::ChangeTabContents(TabContents* contents) {
registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
Source<NavigationController>(&tab_contents_->controller()));
+#if !defined(OS_MACOSX)
// Find out what we should show in the find text box. Usually, this will be
// the last search in this tab, but if no search has been issued in this tab
// we use the last search string (from any tab).
@@ -88,6 +89,11 @@ void FindBarController::ChangeTabContents(TabContents* contents) {
// _first_ since the FindBarView checks its emptiness to see if it should
// clear the result count display when there's nothing in the box.
find_bar_->SetFindText(find_string);
+#else
+ // Having a per-tab find_string is not compatible with OS X's find pasteboard,
+ // so we always have the same find text in all find bars. This is done through
+ // the find pasteboard mechanism, so don't set the text here.
+#endif
if (tab_contents_->find_ui_active()) {
// A tab with a visible find bar just got selected and we need to show the
« no previous file with comments | « chrome/browser/cocoa/find_pasteboard_unittest.mm ('k') | chrome/browser/renderer_host/resource_message_filter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698