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

Side by Side Diff: chrome/browser/views/bookmark_manager_view.cc

Issue 62129: Find should allow keyboard scrolling while Find bar has focus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.h ('k') | chrome/browser/views/bug_report_view.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/bookmark_manager_view.h" 5 #include "chrome/browser/views/bookmark_manager_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h" 10 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h"
11 #include "chrome/browser/bookmarks/bookmark_html_writer.h" 11 #include "chrome/browser/bookmarks/bookmark_html_writer.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 449 }
450 450
451 void BookmarkManagerView::ContentsChanged(views::TextField* sender, 451 void BookmarkManagerView::ContentsChanged(views::TextField* sender,
452 const std::wstring& new_contents) { 452 const std::wstring& new_contents) {
453 search_factory_.RevokeAll(); 453 search_factory_.RevokeAll();
454 MessageLoop::current()->PostDelayedTask(FROM_HERE, 454 MessageLoop::current()->PostDelayedTask(FROM_HERE,
455 search_factory_.NewRunnableMethod(&BookmarkManagerView::PerformSearch), 455 search_factory_.NewRunnableMethod(&BookmarkManagerView::PerformSearch),
456 kSearchDelayMS); 456 kSearchDelayMS);
457 } 457 }
458 458
459 void BookmarkManagerView::HandleKeystroke(views::TextField* sender, 459 bool BookmarkManagerView::HandleKeystroke(views::TextField* sender,
460 UINT message, TCHAR key, 460 UINT message, TCHAR key,
461 UINT repeat_count, 461 UINT repeat_count,
462 UINT flags) { 462 UINT flags) {
463 if (key == VK_RETURN) { 463 if (key == VK_RETURN) {
464 PerformSearch(); 464 PerformSearch();
465 search_tf_->SelectAll(); 465 search_tf_->SelectAll();
466 } 466 }
467
468 return false;
467 } 469 }
468 470
469 void BookmarkManagerView::ShowContextMenu(views::View* source, 471 void BookmarkManagerView::ShowContextMenu(views::View* source,
470 int x, 472 int x,
471 int y, 473 int y,
472 bool is_mouse_gesture) { 474 bool is_mouse_gesture) {
473 DCHECK(source == table_view_ || source == tree_view_); 475 DCHECK(source == table_view_ || source == tree_view_);
474 bool is_table = (source == table_view_); 476 bool is_table = (source == table_view_);
475 ShowMenu(GetWidget()->GetNativeView(), x, y, 477 ShowMenu(GetWidget()->GetNativeView(), x, y,
476 is_table ? BookmarkContextMenu::BOOKMARK_MANAGER_TABLE : 478 is_table ? BookmarkContextMenu::BOOKMARK_MANAGER_TABLE :
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 select_file_dialog_->ListenerDestroyed(); 732 select_file_dialog_->ListenerDestroyed();
731 733
732 select_file_dialog_ = SelectFileDialog::Create(this); 734 select_file_dialog_ = SelectFileDialog::Create(this);
733 select_file_dialog_->SelectFile( 735 select_file_dialog_->SelectFile(
734 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), 736 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(),
735 FilePath(FILE_PATH_LITERAL("bookmarks.html")), 737 FilePath(FILE_PATH_LITERAL("bookmarks.html")),
736 win_util::GetFileFilterFromPath(L"bookmarks.html"), 0, L"html", 738 win_util::GetFileFilterFromPath(L"bookmarks.html"), 0, L"html",
737 GetWidget()->GetNativeView(), 739 GetWidget()->GetNativeView(),
738 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU)); 740 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU));
739 } 741 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.h ('k') | chrome/browser/views/bug_report_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698