OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 int intent_id); | 685 int intent_id); |
686 | 686 |
687 // Helper function to handle find results. | 687 // Helper function to handle find results. |
688 static void FindReplyHelper(TabContents* tab, | 688 static void FindReplyHelper(TabContents* tab, |
689 int request_id, | 689 int request_id, |
690 int number_of_matches, | 690 int number_of_matches, |
691 const gfx::Rect& selection_rect, | 691 const gfx::Rect& selection_rect, |
692 int active_match_ordinal, | 692 int active_match_ordinal, |
693 bool final_update); | 693 bool final_update); |
694 | 694 |
| 695 // Helper function to handle crashed plugin notifications. |
| 696 static void CrashedPluginHelper(TabContents* tab, |
| 697 const FilePath& plugin_path); |
| 698 |
| 699 // Helper function to handle provisional frame load notifications. |
| 700 static void DidStartProvisionalLoadForFrameHelper(TabContents* tab, |
| 701 int64 frame_id, |
| 702 bool is_main_frame, |
| 703 bool has_opener_set, |
| 704 const GURL& url); |
| 705 |
| 706 // Helper function to handle url update notifications. |
| 707 static void UpdateTargetURLHelper(TabContents* tab, int32 page_id, |
| 708 const GURL& url); |
| 709 |
695 // Calls ExecuteCommandWithDisposition with the given disposition. | 710 // Calls ExecuteCommandWithDisposition with the given disposition. |
696 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition); | 711 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition); |
697 | 712 |
698 // Executes a command if it's enabled. | 713 // Executes a command if it's enabled. |
699 // Returns true if the command is executed. | 714 // Returns true if the command is executed. |
700 bool ExecuteCommandIfEnabled(int id); | 715 bool ExecuteCommandIfEnabled(int id); |
701 | 716 |
702 // Returns true if |command_id| is a reserved command whose keyboard shortcuts | 717 // Returns true if |command_id| is a reserved command whose keyboard shortcuts |
703 // should not be sent to the renderer or |event| was triggered by a key that | 718 // should not be sent to the renderer or |event| was triggered by a key that |
704 // we never want to send to the renderer. | 719 // we never want to send to the renderer. |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 const gfx::Rect& initial_pos, | 908 const gfx::Rect& initial_pos, |
894 bool user_gesture) OVERRIDE; | 909 bool user_gesture) OVERRIDE; |
895 virtual void ActivateContents(TabContents* contents) OVERRIDE; | 910 virtual void ActivateContents(TabContents* contents) OVERRIDE; |
896 virtual void DeactivateContents(TabContents* contents) OVERRIDE; | 911 virtual void DeactivateContents(TabContents* contents) OVERRIDE; |
897 virtual void LoadingStateChanged(TabContents* source) OVERRIDE; | 912 virtual void LoadingStateChanged(TabContents* source) OVERRIDE; |
898 virtual void CloseContents(TabContents* source) OVERRIDE; | 913 virtual void CloseContents(TabContents* source) OVERRIDE; |
899 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE; | 914 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE; |
900 virtual void DetachContents(TabContents* source) OVERRIDE; | 915 virtual void DetachContents(TabContents* source) OVERRIDE; |
901 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; | 916 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; |
902 virtual bool CanReloadContents(TabContents* source) const; | 917 virtual bool CanReloadContents(TabContents* source) const; |
903 virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE; | 918 virtual void UpdateTargetURL(TabContents* source, int32 page_id, |
| 919 const GURL& url) OVERRIDE; |
904 virtual void ContentsMouseEvent( | 920 virtual void ContentsMouseEvent( |
905 TabContents* source, const gfx::Point& location, bool motion) OVERRIDE; | 921 TabContents* source, const gfx::Point& location, bool motion) OVERRIDE; |
906 virtual void ContentsZoomChange(bool zoom_in) OVERRIDE; | 922 virtual void ContentsZoomChange(bool zoom_in) OVERRIDE; |
907 virtual void SetTabContentBlocked(TabContents* contents, | 923 virtual void SetTabContentBlocked(TabContents* contents, |
908 bool blocked) OVERRIDE; | 924 bool blocked) OVERRIDE; |
909 virtual void TabContentsFocused(TabContents* tab_content) OVERRIDE; | 925 virtual void TabContentsFocused(TabContents* tab_content) OVERRIDE; |
910 virtual bool TakeFocus(bool reverse) OVERRIDE; | 926 virtual bool TakeFocus(bool reverse) OVERRIDE; |
911 virtual bool IsApplication() const OVERRIDE; | 927 virtual bool IsApplication() const OVERRIDE; |
912 virtual void ConvertContentsToApplication(TabContents* source) OVERRIDE; | 928 virtual void ConvertContentsToApplication(TabContents* source) OVERRIDE; |
913 virtual void BeforeUnloadFired(TabContents* source, | 929 virtual void BeforeUnloadFired(TabContents* source, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 const string16& data, | 984 const string16& data, |
969 int intent_id) OVERRIDE; | 985 int intent_id) OVERRIDE; |
970 | 986 |
971 virtual void FindReply(TabContents* tab, | 987 virtual void FindReply(TabContents* tab, |
972 int request_id, | 988 int request_id, |
973 int number_of_matches, | 989 int number_of_matches, |
974 const gfx::Rect& selection_rect, | 990 const gfx::Rect& selection_rect, |
975 int active_match_ordinal, | 991 int active_match_ordinal, |
976 bool final_update) OVERRIDE; | 992 bool final_update) OVERRIDE; |
977 | 993 |
| 994 virtual void CrashedPlugin(TabContents* tab, |
| 995 const FilePath& plugin_path) OVERRIDE; |
| 996 |
| 997 virtual void DidStartProvisionalLoadForFrame(TabContents* tab, |
| 998 int64 frame_id, |
| 999 bool is_main_frame, |
| 1000 bool has_opener_set, |
| 1001 const GURL& url) OVERRIDE; |
| 1002 |
978 // Overridden from TabContentsWrapperDelegate: | 1003 // Overridden from TabContentsWrapperDelegate: |
979 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source, | 1004 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source, |
980 int32 page_id) OVERRIDE; | 1005 int32 page_id) OVERRIDE; |
981 virtual void OnInstallApplication( | 1006 virtual void OnInstallApplication( |
982 TabContentsWrapper* source, | 1007 TabContentsWrapper* source, |
983 const WebApplicationInfo& app_info) OVERRIDE; | 1008 const WebApplicationInfo& app_info) OVERRIDE; |
984 | 1009 |
985 // Note that the caller is responsible for deleting |old_tab_contents|. | 1010 // Note that the caller is responsible for deleting |old_tab_contents|. |
986 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents, | 1011 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents, |
987 TabContentsWrapper* new_tab_contents); | 1012 TabContentsWrapper* new_tab_contents); |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 // Tab to notify when the browser exits fullscreen mode. | 1430 // Tab to notify when the browser exits fullscreen mode. |
1406 TabContentsWrapper* fullscreened_tab_; | 1431 TabContentsWrapper* fullscreened_tab_; |
1407 | 1432 |
1408 // True if the current tab is in fullscreen mode. | 1433 // True if the current tab is in fullscreen mode. |
1409 bool tab_caused_fullscreen_; | 1434 bool tab_caused_fullscreen_; |
1410 | 1435 |
1411 DISALLOW_COPY_AND_ASSIGN(Browser); | 1436 DISALLOW_COPY_AND_ASSIGN(Browser); |
1412 }; | 1437 }; |
1413 | 1438 |
1414 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1439 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |