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

Side by Side Diff: chrome/browser/browser.h

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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/blocked_popup_container_interactive_uitest.cc ('k') | chrome/browser/browser.cc » ('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) 2009 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 #ifndef CHROME_BROWSER_BROWSER_H_ 5 #ifndef CHROME_BROWSER_BROWSER_H_
6 #define CHROME_BROWSER_BROWSER_H_ 6 #define CHROME_BROWSER_BROWSER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 static void BuildPopupWindowHelper(TabContents* source, 461 static void BuildPopupWindowHelper(TabContents* source,
462 TabContents* new_contents, 462 TabContents* new_contents,
463 const gfx::Rect& initial_pos, 463 const gfx::Rect& initial_pos,
464 Browser::Type browser_type, 464 Browser::Type browser_type,
465 Profile* profile, 465 Profile* profile,
466 bool honor_saved_maximized_state); 466 bool honor_saved_maximized_state);
467 467
468 // Calls ExecuteCommandWithDisposition with the given disposition. 468 // Calls ExecuteCommandWithDisposition with the given disposition.
469 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition); 469 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition);
470 470
471 // Returns whether the |id| is a reserved command, whose keyboard shortcuts
472 // should not be sent to the renderer.
473 bool IsReservedCommand(int id);
474
475 // Sets if command execution shall be blocked. If |block| is true then
476 // following calls to ExecuteCommand() or ExecuteCommandWithDisposition()
477 // method will not execute the command, and the last blocked command will be
478 // recorded for retrieval.
479 void SetBlockCommandExecution(bool block);
480
481 // Gets the last blocked command after calling SetBlockCommandExecution(true).
482 // Returns the command id or -1 if there is no command blocked. The
483 // disposition type of the command will be stored in |*disposition| if it's
484 // not null.
485 int GetLastBlockedCommand(WindowOpenDisposition* disposition);
486
471 // Interface implementations //////////////////////////////////////////////// 487 // Interface implementations ////////////////////////////////////////////////
472 488
473 // Overridden from PageNavigator 489 // Overridden from PageNavigator
474 virtual void OpenURL(const GURL& url, const GURL& referrer, 490 virtual void OpenURL(const GURL& url, const GURL& referrer,
475 WindowOpenDisposition disposition, 491 WindowOpenDisposition disposition,
476 PageTransition::Type transition); 492 PageTransition::Type transition);
477 493
478 // Overridden from CommandUpdater::CommandUpdaterDelegate: 494 // Overridden from CommandUpdater::CommandUpdaterDelegate:
479 virtual void ExecuteCommand(int id); 495 virtual void ExecuteCommand(int id);
480 496
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 virtual void SetFocusToLocationBar(); 579 virtual void SetFocusToLocationBar();
564 virtual void RenderWidgetShowing(); 580 virtual void RenderWidgetShowing();
565 virtual int GetExtraRenderViewHeight() const; 581 virtual int GetExtraRenderViewHeight() const;
566 virtual void OnStartDownload(DownloadItem* download); 582 virtual void OnStartDownload(DownloadItem* download);
567 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, 583 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url,
568 Profile* profile); 584 Profile* profile);
569 virtual void ShowPageInfo(Profile* profile, 585 virtual void ShowPageInfo(Profile* profile,
570 const GURL& url, 586 const GURL& url,
571 const NavigationEntry::SSLStatus& ssl, 587 const NavigationEntry::SSLStatus& ssl,
572 bool show_history); 588 bool show_history);
573 virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event); 589 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
590 bool* is_keyboard_shortcut);
591 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
574 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); 592 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents);
575 virtual bool ShouldAddNavigationsToHistory() const; 593 virtual bool ShouldAddNavigationsToHistory() const;
576 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, 594 virtual void OnDidGetApplicationInfo(TabContents* tab_contents,
577 int32 page_id); 595 int32 page_id);
578 virtual Browser* GetBrowser() { return this; } 596 virtual Browser* GetBrowser() { return this; }
579 597
580 // Overridden from SelectFileDialog::Listener: 598 // Overridden from SelectFileDialog::Listener:
581 virtual void FileSelected(const FilePath& path, int index, void* params); 599 virtual void FileSelected(const FilePath& path, int index, void* params);
582 600
583 // Overridden from NotificationObserver: 601 // Overridden from NotificationObserver:
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 // The Find Bar. This may be NULL if there is no Find Bar, and if it is 835 // The Find Bar. This may be NULL if there is no Find Bar, and if it is
818 // non-NULL, it may or may not be visible. 836 // non-NULL, it may or may not be visible.
819 scoped_ptr<FindBarController> find_bar_controller_; 837 scoped_ptr<FindBarController> find_bar_controller_;
820 838
821 // Dialog box used for opening and saving files. 839 // Dialog box used for opening and saving files.
822 scoped_refptr<SelectFileDialog> select_file_dialog_; 840 scoped_refptr<SelectFileDialog> select_file_dialog_;
823 841
824 // Keep track of the encoding auto detect pref. 842 // Keep track of the encoding auto detect pref.
825 BooleanPrefMember encoding_auto_detect_; 843 BooleanPrefMember encoding_auto_detect_;
826 844
845 // Indicates if command execution is blocked.
846 bool block_command_execution_;
847
848 // Stores the last blocked command id when |block_command_execution_| is true.
849 int last_blocked_command_id_;
850
851 // Stores the disposition type of the last blocked command.
852 WindowOpenDisposition last_blocked_command_disposition_;
853
827 DISALLOW_COPY_AND_ASSIGN(Browser); 854 DISALLOW_COPY_AND_ASSIGN(Browser);
828 }; 855 };
829 856
830 #endif // CHROME_BROWSER_BROWSER_H_ 857 #endif // CHROME_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/blocked_popup_container_interactive_uitest.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698