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

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

Issue 7745027: Dispatch the following IPC messages in TabContents and handle them via the TabContentsDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/ui/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) 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 static Browser* GetOrCreateTabbedBrowser(Profile* profile); 643 static Browser* GetOrCreateTabbedBrowser(Profile* profile);
644 644
645 // Helper function to display the file selection dialog. 645 // Helper function to display the file selection dialog.
646 static void RunFileChooserHelper( 646 static void RunFileChooserHelper(
647 TabContents* tab, const ViewHostMsg_RunFileChooser_Params& params); 647 TabContents* tab, const ViewHostMsg_RunFileChooser_Params& params);
648 648
649 // Helper function to enumerate a directory. 649 // Helper function to enumerate a directory.
650 static void EnumerateDirectoryHelper(TabContents* tab, int request_id, 650 static void EnumerateDirectoryHelper(TabContents* tab, int request_id,
651 const FilePath& path); 651 const FilePath& path);
652 652
653 // Helper function to handle JS out of memory notifications
654 static void JSOutOfMemoryHelper(TabContents* tab);
655
656 // Helper function to register a protocol handler.
657 static void RegisterProtocolHandlerHelper(TabContents* tab,
658 const std::string& protocol,
659 const GURL& url,
660 const string16& title);
661
662 // Helper function to register an intent handler.
663 static void RegisterIntentHandlerHelper(TabContents* tab,
664 const string16& action,
665 const string16& type,
666 const string16& href,
667 const string16& title);
668
669 // Helper function to handle WebIntent notifications.
670 static void WebIntentDispatchHelper(TabContents* tab,
671 int routing_id,
672 const string16& action,
673 const string16& type,
674 const string16& data,
675 int intent_id);
676
653 // Calls ExecuteCommandWithDisposition with the given disposition. 677 // Calls ExecuteCommandWithDisposition with the given disposition.
654 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition); 678 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition);
655 679
656 // Executes a command if it's enabled. 680 // Executes a command if it's enabled.
657 // Returns true if the command is executed. 681 // Returns true if the command is executed.
658 bool ExecuteCommandIfEnabled(int id); 682 bool ExecuteCommandIfEnabled(int id);
659 683
660 // Returns true if |command_id| is a reserved command whose keyboard shortcuts 684 // Returns true if |command_id| is a reserved command whose keyboard shortcuts
661 // should not be sent to the renderer or |event| was triggered by a key that 685 // should not be sent to the renderer or |event| was triggered by a key that
662 // we never want to send to the renderer. 686 // we never want to send to the renderer.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 virtual void DidNavigateToPendingEntry(TabContents* tab) OVERRIDE; 926 virtual void DidNavigateToPendingEntry(TabContents* tab) OVERRIDE;
903 virtual content::JavaScriptDialogCreator* 927 virtual content::JavaScriptDialogCreator*
904 GetJavaScriptDialogCreator() OVERRIDE; 928 GetJavaScriptDialogCreator() OVERRIDE;
905 virtual void RunFileChooser( 929 virtual void RunFileChooser(
906 TabContents* tab, 930 TabContents* tab,
907 const ViewHostMsg_RunFileChooser_Params& params) OVERRIDE; 931 const ViewHostMsg_RunFileChooser_Params& params) OVERRIDE;
908 virtual void EnumerateDirectory(TabContents* tab, int request_id, 932 virtual void EnumerateDirectory(TabContents* tab, int request_id,
909 const FilePath& path) OVERRIDE; 933 const FilePath& path) OVERRIDE;
910 virtual void ToggleFullscreenModeForTab(TabContents* tab, 934 virtual void ToggleFullscreenModeForTab(TabContents* tab,
911 bool enter_fullscreen) OVERRIDE; 935 bool enter_fullscreen) OVERRIDE;
936 virtual void JSOutOfMemory(TabContents* tab) OVERRIDE;
937 virtual void RegisterProtocolHandler(TabContents* tab,
938 const std::string& protocol,
939 const GURL& url,
940 const string16& title) OVERRIDE;
941 virtual void RegisterIntentHandler(TabContents* tab,
942 const string16& action,
943 const string16& type,
944 const string16& href,
945 const string16& title) OVERRIDE;
946 virtual void WebIntentDispatch(TabContents* tab,
947 int routing_id,
948 const string16& action,
949 const string16& type,
950 const string16& data,
951 int intent_id) OVERRIDE;
912 952
913 // Overridden from TabContentsWrapperDelegate: 953 // Overridden from TabContentsWrapperDelegate:
914 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source, 954 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source,
915 int32 page_id) OVERRIDE; 955 int32 page_id) OVERRIDE;
916 virtual void OnInstallApplication( 956 virtual void OnInstallApplication(
917 TabContentsWrapper* source, 957 TabContentsWrapper* source,
918 const WebApplicationInfo& app_info) OVERRIDE; 958 const WebApplicationInfo& app_info) OVERRIDE;
919 959
920 // Note that the caller is responsible for deleting |old_tab_contents|. 960 // Note that the caller is responsible for deleting |old_tab_contents|.
921 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents, 961 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents,
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 // Tab to notify when the browser exits fullscreen mode. 1374 // Tab to notify when the browser exits fullscreen mode.
1335 TabContentsWrapper* fullscreened_tab_; 1375 TabContentsWrapper* fullscreened_tab_;
1336 1376
1337 // True if the current tab is in fullscreen mode. 1377 // True if the current tab is in fullscreen mode.
1338 bool tab_caused_fullscreen_; 1378 bool tab_caused_fullscreen_;
1339 1379
1340 DISALLOW_COPY_AND_ASSIGN(Browser); 1380 DISALLOW_COPY_AND_ASSIGN(Browser);
1341 }; 1381 };
1342 1382
1343 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1383 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698