diff options
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/bookmark_editor_view.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_manager_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_manager_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.h | 12 | ||||
-rw-r--r-- | chrome/browser/views/edit_keyword_controller.cc | 7 | ||||
-rw-r--r-- | chrome/browser/views/edit_keyword_controller.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_view.cc | 15 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_win.cc | 18 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_win.h | 5 | ||||
-rw-r--r-- | chrome/browser/views/input_window.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/new_profile_dialog.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/options/cookies_view.cc | 11 | ||||
-rw-r--r-- | chrome/browser/views/options/cookies_view.h | 12 | ||||
-rw-r--r-- | chrome/browser/views/options/general_page_view.cc | 12 | ||||
-rw-r--r-- | chrome/browser/views/options/general_page_view.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/shelf_item_dialog.h | 14 |
18 files changed, 100 insertions, 59 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h index ed1b001..a307277 100644 --- a/chrome/browser/views/bookmark_editor_view.h +++ b/chrome/browser/views/bookmark_editor_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -107,9 +107,9 @@ class BookmarkEditorView : public views::View, // TextField::Controller methods. virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, - UINT flags) {} + UINT flags) { return false; } // NativeButton. virtual void ButtonPressed(views::Button* sender); diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc index b9fccb1a..12150c6 100644 --- a/chrome/browser/views/bookmark_manager_view.cc +++ b/chrome/browser/views/bookmark_manager_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -456,7 +456,7 @@ void BookmarkManagerView::ContentsChanged(views::TextField* sender, kSearchDelayMS); } -void BookmarkManagerView::HandleKeystroke(views::TextField* sender, +bool BookmarkManagerView::HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { @@ -464,6 +464,8 @@ void BookmarkManagerView::HandleKeystroke(views::TextField* sender, PerformSearch(); search_tf_->SelectAll(); } + + return false; } void BookmarkManagerView::ShowContextMenu(views::View* source, diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h index bf0826a..9f986aa 100644 --- a/chrome/browser/views/bookmark_manager_view.h +++ b/chrome/browser/views/bookmark_manager_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -136,7 +136,7 @@ class BookmarkManagerView : public views::View, virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); // If return has been pressed this performs an immediate search. - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags); diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc index 2ae5afa..1144065 100644 --- a/chrome/browser/views/bug_report_view.cc +++ b/chrome/browser/views/bug_report_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -91,7 +91,7 @@ class BugReportComboBoxModel : public views::ComboBox::Model { } private: - DISALLOW_EVIL_CONSTRUCTORS(BugReportComboBoxModel); + DISALLOW_COPY_AND_ASSIGN(BugReportComboBoxModel); }; // Simple URLFetcher::Delegate to clean up URLFetcher on completion @@ -107,7 +107,7 @@ class BugReportView::PostCleanup : public URLFetcher::Delegate { const ResponseCookies& cookies, const std::string& data); private: - DISALLOW_EVIL_CONSTRUCTORS(PostCleanup); + DISALLOW_COPY_AND_ASSIGN(PostCleanup); }; BugReportView::PostCleanup::PostCleanup() { @@ -260,9 +260,10 @@ void BugReportView::ContentsChanged(views::TextField* sender, const std::wstring& new_contents) { } -void BugReportView::HandleKeystroke(views::TextField* sender, +bool BugReportView::HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { + return false; } std::wstring BugReportView::GetDialogButtonLabel(DialogButton button) const { diff --git a/chrome/browser/views/bug_report_view.h b/chrome/browser/views/bug_report_view.h index de3e4b4..22a2c42 100644 --- a/chrome/browser/views/bug_report_view.h +++ b/chrome/browser/views/bug_report_view.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_ -#define CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_ +#ifndef CHROME_BROWSER_VIEWS_BUG_REPORT_VIEW_H_ +#define CHROME_BROWSER_VIEWS_BUG_REPORT_VIEW_H_ #include "chrome/browser/net/url_fetcher.h" #include "chrome/views/controls/combo_box.h" @@ -52,7 +52,7 @@ class BugReportView : public views::View, // views::TextField::Controller implementation: virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags); @@ -120,7 +120,7 @@ class BugReportView : public views::View, // their original text so they don't have to type it again. std::wstring old_report_text_; - DISALLOW_EVIL_CONSTRUCTORS(BugReportView); + DISALLOW_COPY_AND_ASSIGN(BugReportView); }; -#endif // CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_ +#endif // CHROME_BROWSER_VIEWS_BUG_REPORT_VIEW_H_ diff --git a/chrome/browser/views/edit_keyword_controller.cc b/chrome/browser/views/edit_keyword_controller.cc index 1968d27..1463777d 100644 --- a/chrome/browser/views/edit_keyword_controller.cc +++ b/chrome/browser/views/edit_keyword_controller.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -161,11 +161,12 @@ void EditKeywordController::ContentsChanged(TextField* sender, UpdateImageViews(); } -void EditKeywordController::HandleKeystroke(TextField* sender, +bool EditKeywordController::HandleKeystroke(TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { + return false; } void EditKeywordController::Init() { @@ -328,7 +329,7 @@ std::wstring EditKeywordController::GetURL() const { bool EditKeywordController::IsKeywordValid() const { std::wstring keyword = keyword_tf_->GetText(); if (keyword.empty()) - return true; // Always allow no keyword. + return true; // Always allow no keyword. const TemplateURL* turl_with_keyword = profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); return (turl_with_keyword == NULL || turl_with_keyword == template_url_); diff --git a/chrome/browser/views/edit_keyword_controller.h b/chrome/browser/views/edit_keyword_controller.h index a94422e..00a76fe 100644 --- a/chrome/browser/views/edit_keyword_controller.h +++ b/chrome/browser/views/edit_keyword_controller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -56,7 +56,7 @@ class EditKeywordController : public views::TextField::Controller, // valid. virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc index 3930a7e..e5fcf4f 100644 --- a/chrome/browser/views/find_bar_view.cc +++ b/chrome/browser/views/find_bar_view.cc @@ -473,11 +473,11 @@ void FindBarView::ContentsChanged(views::TextField* sender, } } -void FindBarView::HandleKeystroke(views::TextField* sender, UINT message, +bool FindBarView::HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { // If the dialog is not visible, there is no reason to process keyboard input. if (!container_->IsVisible()) - return; + return false; switch (key) { case VK_RETURN: { @@ -491,7 +491,18 @@ void FindBarView::HandleKeystroke(views::TextField* sender, UINT message, } break; } +#if defined(OS_WIN) + // TODO(port): Handle this for other platforms. + case VK_UP: + case VK_DOWN: + case VK_PRIOR: // Page up + case VK_NEXT: // Page down + container_->ForwardKeystrokeToWebpage(key); + return true; // Message has been handled. No further processing needed. +#endif } + + return false; } void FindBarView::ResetMatchCountBackground() { diff --git a/chrome/browser/views/find_bar_view.h b/chrome/browser/views/find_bar_view.h index 148fa83d..3ea4542 100644 --- a/chrome/browser/views/find_bar_view.h +++ b/chrome/browser/views/find_bar_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -67,7 +67,7 @@ class FindBarView : public views::View, // Overridden from views::TextField::Controller: virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, UINT message, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags); // Set whether or not we're attempting to blend with the toolbar. diff --git a/chrome/browser/views/find_bar_win.cc b/chrome/browser/views/find_bar_win.cc index 5e1ed79..a1d01a9 100644 --- a/chrome/browser/views/find_bar_win.cc +++ b/chrome/browser/views/find_bar_win.cc @@ -232,6 +232,24 @@ void FindBarWin::MoveWindowIfNecessary(const gfx::Rect& selection_rect, view_->SchedulePaint(); } +void FindBarWin::ForwardKeystrokeToWebpage(TCHAR key) { + WebContents* contents = find_bar_controller_->web_contents(); + if (!contents) + return; + + RenderViewHost* render_view_host = contents->render_view_host(); + + // Make sure we don't have a text field element interfering with keyboard + // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". + render_view_host->ClearFocusedNode(); + + HWND hwnd = contents->GetContentNativeView(); + render_view_host->ForwardKeyboardEvent( + NativeWebKeyboardEvent(hwnd, WM_KEYDOWN, key, 0)); + render_view_host->ForwardKeyboardEvent( + NativeWebKeyboardEvent(hwnd, WM_KEYUP, key, 0)); +} + //////////////////////////////////////////////////////////////////////////////// // FindBarWin, views::WidgetWin implementation: diff --git a/chrome/browser/views/find_bar_win.h b/chrome/browser/views/find_bar_win.h index 3fb4f75..d2f84fa 100644 --- a/chrome/browser/views/find_bar_win.h +++ b/chrome/browser/views/find_bar_win.h @@ -59,6 +59,11 @@ class FindBarWin : public views::FocusChangeListener, // new |parent_hwnd|. void SetFocusChangeListener(HWND parent_hwnd); + // Forwards keystrokes to the renderer. This is useful to make sure that + // arrow keys and PageUp and PageDown result in scrolling, instead of + // being eaten because the FindBar has focus. + void ForwardKeystrokeToWebpage(TCHAR key); + // FindBar implementation: virtual FindBarController* GetFindBarController() const { return find_bar_controller_; diff --git a/chrome/browser/views/input_window.cc b/chrome/browser/views/input_window.cc index f650320..8d8c24f 100644 --- a/chrome/browser/views/input_window.cc +++ b/chrome/browser/views/input_window.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -45,7 +45,9 @@ class ContentView : public views::View, // views::TextField::Controller overrides: virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField*, UINT, TCHAR, UINT, UINT) {} + virtual bool HandleKeystroke(views::TextField*, UINT, TCHAR, UINT, UINT) { + return false; + } protected: // views::View overrides: @@ -69,7 +71,7 @@ class ContentView : public views::View, // Helps us set focus to the first TextField in the window. ScopedRunnableMethodFactory<ContentView> focus_grabber_factory_; - DISALLOW_EVIL_CONSTRUCTORS(ContentView); + DISALLOW_COPY_AND_ASSIGN(ContentView); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/new_profile_dialog.h b/chrome/browser/views/new_profile_dialog.h index da36728..868480e 100644 --- a/chrome/browser/views/new_profile_dialog.h +++ b/chrome/browser/views/new_profile_dialog.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -39,9 +39,9 @@ class NewProfileDialog : public views::DialogDelegate, // views::TextField::Controller methods. virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, - UINT flags) {} + UINT flags) { return false; } // views::WindowDelegate methods. virtual views::View* GetContentsView(); diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc index 2bdc149..f5c0a68 100644 --- a/chrome/browser/views/options/cookies_view.cc +++ b/chrome/browser/views/options/cookies_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -75,7 +75,7 @@ class CookiesTableModel : public views::TableModel { views::TableModelObserver* observer_; - DISALLOW_EVIL_CONSTRUCTORS(CookiesTableModel); + DISALLOW_COPY_AND_ASSIGN(CookiesTableModel); }; /////////////////////////////////////////////////////////////////////////////// @@ -264,7 +264,7 @@ class CookiesTableView : public views::TableView { // Our model, as a CookiesTableModel. CookiesTableModel* cookies_model_; - DISALLOW_EVIL_CONSTRUCTORS(CookiesTableView); + DISALLOW_COPY_AND_ASSIGN(CookiesTableView); }; CookiesTableView::CookiesTableView( @@ -353,7 +353,7 @@ class CookieInfoView : public views::View { views::Label* expires_label_; views::TextField* expires_value_field_; - DISALLOW_EVIL_CONSTRUCTORS(CookieInfoView); + DISALLOW_COPY_AND_ASSIGN(CookieInfoView); }; /////////////////////////////////////////////////////////////////////////////// @@ -620,7 +620,7 @@ void CookiesView::ContentsChanged(views::TextField* sender, &CookiesView::UpdateSearchResults), kSearchFilterDelayMs); } -void CookiesView::HandleKeystroke(views::TextField* sender, UINT message, +bool CookiesView::HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { switch (key) { case VK_ESCAPE: @@ -631,6 +631,7 @@ void CookiesView::HandleKeystroke(views::TextField* sender, UINT message, UpdateSearchResults(); break; } + return false; } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/options/cookies_view.h b/chrome/browser/views/options/cookies_view.h index ab8b213..2baed44 100644 --- a/chrome/browser/views/options/cookies_view.h +++ b/chrome/browser/views/options/cookies_view.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H__ -#define CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H__ +#ifndef CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H_ +#define CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H_ #include "base/task.h" #include "chrome/views/controls/button/button.h" @@ -50,7 +50,7 @@ class CookiesView : public views::View, // views::TextField::Controller implementation: virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags); @@ -112,7 +112,7 @@ class CookiesView : public views::View, // window somewhere. static views::Window* instance_; - DISALLOW_EVIL_CONSTRUCTORS(CookiesView); + DISALLOW_COPY_AND_ASSIGN(CookiesView); }; -#endif // #ifndef CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H__ +#endif // CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H_ diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc index 564aef1..5257ad9 100644 --- a/chrome/browser/views/options/general_page_view.cc +++ b/chrome/browser/views/options/general_page_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -96,7 +96,7 @@ class GeneralPageView::DefaultBrowserWorker MessageLoop* ui_loop_; MessageLoop* file_loop_; - DISALLOW_EVIL_CONSTRUCTORS(GeneralPageView::DefaultBrowserWorker); + DISALLOW_COPY_AND_ASSIGN(GeneralPageView::DefaultBrowserWorker); }; GeneralPageView::DefaultBrowserWorker::DefaultBrowserWorker( @@ -239,7 +239,7 @@ class CustomHomePagesTableModel : public views::TableModel { // Used in loading favicons. CancelableRequestConsumer fav_icon_consumer_; - DISALLOW_EVIL_CONSTRUCTORS(CustomHomePagesTableModel); + DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); }; // static @@ -418,7 +418,7 @@ class SearchEngineListModel : public views::ComboBox::Model, typedef std::vector<const TemplateURL*> TemplateURLs; TemplateURLs template_urls_; - DISALLOW_EVIL_CONSTRUCTORS(SearchEngineListModel); + DISALLOW_COPY_AND_ASSIGN(SearchEngineListModel); }; SearchEngineListModel::SearchEngineListModel(Profile* profile) @@ -614,10 +614,10 @@ void GeneralPageView::ContentsChanged(views::TextField* sender, } } -void GeneralPageView::HandleKeystroke(views::TextField* sender, +bool GeneralPageView::HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags) { - // Not necessary. + return false; } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/options/general_page_view.h b/chrome/browser/views/options/general_page_view.h index 2ec7f4e..4887e1b 100644 --- a/chrome/browser/views/options/general_page_view.h +++ b/chrome/browser/views/options/general_page_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -51,7 +51,7 @@ class GeneralPageView : public OptionsPageView, // views::TextField::Controller implementation: virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, UINT flags); @@ -155,7 +155,7 @@ class GeneralPageView : public OptionsPageView, friend DefaultBrowserWorker; scoped_refptr<DefaultBrowserWorker> default_browser_worker_; - DISALLOW_EVIL_CONSTRUCTORS(GeneralPageView); + DISALLOW_COPY_AND_ASSIGN(GeneralPageView); }; #endif // CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ diff --git a/chrome/browser/views/shelf_item_dialog.h b/chrome/browser/views/shelf_item_dialog.h index a90b593..9e5520d 100644 --- a/chrome/browser/views/shelf_item_dialog.h +++ b/chrome/browser/views/shelf_item_dialog.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H__ -#define CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H__ +#ifndef CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H_ +#define CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H_ #include "chrome/browser/cancelable_request.h" #include "chrome/browser/history/history.h" @@ -67,9 +67,9 @@ class ShelfItemDialog : public views::View, // TextField::Controller. virtual void ContentsChanged(views::TextField* sender, const std::wstring& new_contents); - virtual void HandleKeystroke(views::TextField* sender, + virtual bool HandleKeystroke(views::TextField* sender, UINT message, TCHAR key, UINT repeat_count, - UINT flags) {} + UINT flags) { return false; } // Overridden from View. virtual gfx::Size GetPreferredSize(); @@ -120,7 +120,7 @@ class ShelfItemDialog : public views::View, // The delegate. ShelfItemDialogDelegate* delegate_; - DISALLOW_EVIL_CONSTRUCTORS(ShelfItemDialog); + DISALLOW_COPY_AND_ASSIGN(ShelfItemDialog); }; -#endif // CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H__ +#endif // CHROME_BROWSER_VIEWS_SHELF_ITEM_DIALOG_H_ |