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

Side by Side Diff: content/browser/tab_contents/tab_contents.h

Issue 8587009: Add OVERRIDE to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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
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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // The TabContentsView will never change and is guaranteed non-NULL. 137 // The TabContentsView will never change and is guaranteed non-NULL.
138 TabContentsView* view() const { 138 TabContentsView* view() const {
139 return view_.get(); 139 return view_.get();
140 } 140 }
141 141
142 // Tab navigation state ------------------------------------------------------ 142 // Tab navigation state ------------------------------------------------------
143 143
144 // Returns the current navigation properties, which if a navigation is 144 // Returns the current navigation properties, which if a navigation is
145 // pending may be provisional (e.g., the navigation could result in a 145 // pending may be provisional (e.g., the navigation could result in a
146 // download, in which case the URL would revert to what it was previously). 146 // download, in which case the URL would revert to what it was previously).
147 virtual const GURL& GetURL() const; 147 virtual const GURL& GetURL() const OVERRIDE;
148 virtual const string16& GetTitle() const; 148 virtual const string16& GetTitle() const;
149 149
150 // The max PageID of any page that this TabContents has loaded. PageIDs 150 // The max PageID of any page that this TabContents has loaded. PageIDs
151 // increase with each new page that is loaded by a tab. If this is a 151 // increase with each new page that is loaded by a tab. If this is a
152 // TabContents, then the max PageID is kept separately on each SiteInstance. 152 // TabContents, then the max PageID is kept separately on each SiteInstance.
153 // Returns -1 if no PageIDs have yet been seen. 153 // Returns -1 if no PageIDs have yet been seen.
154 int32 GetMaxPageID(); 154 int32 GetMaxPageID();
155 155
156 // Updates the max PageID to be at least the given PageID. 156 // Updates the max PageID to be at least the given PageID.
157 void UpdateMaxPageID(int32 page_id); 157 void UpdateMaxPageID(int32 page_id);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // Invoked when this tab is getting the focus through tab traversal (|reverse| 308 // Invoked when this tab is getting the focus through tab traversal (|reverse|
309 // is true when using Shift-Tab). 309 // is true when using Shift-Tab).
310 void FocusThroughTabTraversal(bool reverse); 310 void FocusThroughTabTraversal(bool reverse);
311 311
312 // These next two functions are declared on RenderViewHostManager::Delegate 312 // These next two functions are declared on RenderViewHostManager::Delegate
313 // but also accessed directly by other callers. 313 // but also accessed directly by other callers.
314 314
315 // Returns true if the location bar should be focused by default rather than 315 // Returns true if the location bar should be focused by default rather than
316 // the page contents. The view calls this function when the tab is focused 316 // the page contents. The view calls this function when the tab is focused
317 // to see what it should do. 317 // to see what it should do.
318 virtual bool FocusLocationBarByDefault(); 318 virtual bool FocusLocationBarByDefault() OVERRIDE;
319 319
320 // Focuses the location bar. 320 // Focuses the location bar.
321 virtual void SetFocusToLocationBar(bool select_all); 321 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE;
322 322
323 // Creates a view and sets the size for the specified RVH. 323 // Creates a view and sets the size for the specified RVH.
324 virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh); 324 virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) OVERRIDE;
325 325
326 // Toolbars and such --------------------------------------------------------- 326 // Toolbars and such ---------------------------------------------------------
327 327
328 // Notifies the delegate that a download is about to be started. 328 // Notifies the delegate that a download is about to be started.
329 // This notification is fired before a local temporary file has been created. 329 // This notification is fired before a local temporary file has been created.
330 bool CanDownload(int request_id); 330 bool CanDownload(int request_id);
331 331
332 // Notifies the delegate that a download started. 332 // Notifies the delegate that a download started.
333 void OnStartDownload(DownloadItem* download); 333 void OnStartDownload(DownloadItem* download);
334 334
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 virtual void Activate() OVERRIDE; 539 virtual void Activate() OVERRIDE;
540 virtual void Deactivate() OVERRIDE; 540 virtual void Deactivate() OVERRIDE;
541 virtual void LostCapture() OVERRIDE; 541 virtual void LostCapture() OVERRIDE;
542 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 542 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
543 bool* is_keyboard_shortcut) OVERRIDE; 543 bool* is_keyboard_shortcut) OVERRIDE;
544 virtual void HandleKeyboardEvent( 544 virtual void HandleKeyboardEvent(
545 const NativeWebKeyboardEvent& event) OVERRIDE; 545 const NativeWebKeyboardEvent& event) OVERRIDE;
546 virtual void HandleMouseDown() OVERRIDE; 546 virtual void HandleMouseDown() OVERRIDE;
547 virtual void HandleMouseUp() OVERRIDE; 547 virtual void HandleMouseUp() OVERRIDE;
548 virtual void HandleMouseActivate() OVERRIDE; 548 virtual void HandleMouseActivate() OVERRIDE;
549 virtual bool OnMessageReceived(const IPC::Message& message); 549 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
550 virtual void RunFileChooser(RenderViewHost* render_view_host, 550 virtual void RunFileChooser(
551 const ViewHostMsg_RunFileChooser_Params& params); 551 RenderViewHost* render_view_host,
552 const ViewHostMsg_RunFileChooser_Params& params) OVERRIDE;
552 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; 553 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE;
553 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; 554 virtual bool IsFullscreenForCurrentTab() const OVERRIDE;
554 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; 555 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE;
555 virtual void WebUISend(RenderViewHost* render_view_host, 556 virtual void WebUISend(RenderViewHost* render_view_host,
556 const GURL& source_url, 557 const GURL& source_url,
557 const std::string& name, 558 const std::string& name,
558 const base::ListValue& args) OVERRIDE; 559 const base::ListValue& args) OVERRIDE;
559 virtual void RequestToLockMouse() OVERRIDE; 560 virtual void RequestToLockMouse() OVERRIDE;
560 virtual void LostMouseLock() OVERRIDE; 561 virtual void LostMouseLock() OVERRIDE;
561 562
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 702
702 // Helper functions for sending notifications. 703 // Helper functions for sending notifications.
703 void NotifySwapped(); 704 void NotifySwapped();
704 void NotifyConnected(); 705 void NotifyConnected();
705 void NotifyDisconnected(); 706 void NotifyDisconnected();
706 707
707 // RenderViewHostManager::Delegate ------------------------------------------- 708 // RenderViewHostManager::Delegate -------------------------------------------
708 709
709 virtual void BeforeUnloadFiredFromRenderManager( 710 virtual void BeforeUnloadFiredFromRenderManager(
710 bool proceed, 711 bool proceed,
711 bool* proceed_to_fire_unload); 712 bool* proceed_to_fire_unload) OVERRIDE;
712 virtual void DidStartLoadingFromRenderManager( 713 virtual void DidStartLoadingFromRenderManager(
713 RenderViewHost* render_view_host); 714 RenderViewHost* render_view_host) OVERRIDE;
714 virtual void RenderViewGoneFromRenderManager( 715 virtual void RenderViewGoneFromRenderManager(
715 RenderViewHost* render_view_host); 716 RenderViewHost* render_view_host) OVERRIDE;
716 virtual void UpdateRenderViewSizeForRenderManager(); 717 virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE;
717 virtual void NotifySwappedFromRenderManager(); 718 virtual void NotifySwappedFromRenderManager() OVERRIDE;
718 virtual NavigationController& GetControllerForRenderManager(); 719 virtual NavigationController& GetControllerForRenderManager() OVERRIDE;
719 virtual WebUI* CreateWebUIForRenderManager(const GURL& url); 720 virtual WebUI* CreateWebUIForRenderManager(const GURL& url) OVERRIDE;
720 virtual NavigationEntry* GetLastCommittedNavigationEntryForRenderManager(); 721 virtual NavigationEntry*
722 GetLastCommittedNavigationEntryForRenderManager() OVERRIDE;
721 723
722 // Initializes the given renderer if necessary and creates the view ID 724 // Initializes the given renderer if necessary and creates the view ID
723 // corresponding to this view host. If this method is not called and the 725 // corresponding to this view host. If this method is not called and the
724 // process is not shared, then the TabContents will act as though the renderer 726 // process is not shared, then the TabContents will act as though the renderer
725 // is not running (i.e., it will render "sad tab"). This method is 727 // is not running (i.e., it will render "sad tab"). This method is
726 // automatically called from LoadURL. 728 // automatically called from LoadURL.
727 // 729 //
728 // If you are attaching to an already-existing RenderView, you should call 730 // If you are attaching to an already-existing RenderView, you should call
729 // InitWithExistingID. 731 // InitWithExistingID.
730 virtual bool CreateRenderViewForRenderManager( 732 virtual bool CreateRenderViewForRenderManager(
731 RenderViewHost* render_view_host); 733 RenderViewHost* render_view_host) OVERRIDE;
732 734
733 // Stores random bits of data for others to associate with this object. 735 // Stores random bits of data for others to associate with this object.
734 // WARNING: this needs to be deleted after NavigationController. 736 // WARNING: this needs to be deleted after NavigationController.
735 PropertyBag property_bag_; 737 PropertyBag property_bag_;
736 738
737 // Data for core operation --------------------------------------------------- 739 // Data for core operation ---------------------------------------------------
738 740
739 // Delegate for notifying our owner about stuff. Not owned by us. 741 // Delegate for notifying our owner about stuff. Not owned by us.
740 TabContentsDelegate* delegate_; 742 TabContentsDelegate* delegate_;
741 743
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 // (full-page plugins for now only) permissions. 871 // (full-page plugins for now only) permissions.
870 int content_restrictions_; 872 int content_restrictions_;
871 873
872 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. 874 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS.
873 content::ViewType view_type_; 875 content::ViewType view_type_;
874 876
875 DISALLOW_COPY_AND_ASSIGN(TabContents); 877 DISALLOW_COPY_AND_ASSIGN(TabContents);
876 }; 878 };
877 879
878 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 880 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/render_view_host_manager.h ('k') | content/browser/tab_contents/tab_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698