| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ | 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ |
| 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ | 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ |
| 7 | 7 |
| 8 namespace ChromeView { | 8 namespace ChromeView { |
| 9 class KeyEvent; | 9 class KeyEvent; |
| 10 class View; | 10 class View; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 void SetTabContents(TabContents* tab_contents); | 29 void SetTabContents(TabContents* tab_contents); |
| 30 TabContents* GetTabContents() const { return tab_contents_; } | 30 TabContents* GetTabContents() const { return tab_contents_; } |
| 31 | 31 |
| 32 // Overridden from View. | 32 // Overridden from View. |
| 33 virtual views::FocusTraversable* GetFocusTraversable(); | 33 virtual views::FocusTraversable* GetFocusTraversable(); |
| 34 virtual bool IsFocusable() const; | 34 virtual bool IsFocusable() const; |
| 35 virtual void Focus(); | 35 virtual void Focus(); |
| 36 virtual void RequestFocus(); | 36 virtual void RequestFocus(); |
| 37 virtual void AboutToRequestFocusFromTabTraversal(bool reverse); | 37 virtual void AboutToRequestFocusFromTabTraversal(bool reverse); |
| 38 virtual bool CanProcessTabKeyEvents(); | 38 virtual bool CanProcessTabKeyEvents(); |
| 39 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
| 39 | 40 |
| 40 // Overridden from HWNDView. | 41 // Overridden from HWNDView. |
| 41 virtual views::FocusTraversable* GetFocusTraversableParent(); | 42 virtual views::FocusTraversable* GetFocusTraversableParent(); |
| 42 virtual views::View* GetFocusTraversableParentView(); | 43 virtual views::View* GetFocusTraversableParentView(); |
| 43 | 44 |
| 44 // NotificationObserver implementation. | 45 // NotificationObserver implementation. |
| 45 virtual void Observe(NotificationType type, | 46 virtual void Observe(NotificationType type, |
| 46 const NotificationSource& source, | 47 const NotificationSource& source, |
| 47 const NotificationDetails& details); | 48 const NotificationDetails& details); |
| 48 | 49 |
| 49 // Returns the MSAA role of the current view. The role is what assistive | |
| 50 // technologies (ATs) use to determine what behavior to expect from a given | |
| 51 // control. | |
| 52 bool GetAccessibleRole(VARIANT* role); | |
| 53 | |
| 54 protected: | 50 protected: |
| 55 // Web content should be given first crack at accelerators. This function | 51 // Web content should be given first crack at accelerators. This function |
| 56 // returns false if the current tab is a webcontents. | 52 // returns false if the current tab is a webcontents. |
| 57 virtual bool ShouldLookupAccelerators(const views::KeyEvent& e); | 53 virtual bool ShouldLookupAccelerators(const views::KeyEvent& e); |
| 58 | 54 |
| 59 private: | 55 private: |
| 60 // Add or remove observers for events that we care about. | 56 // Add or remove observers for events that we care about. |
| 61 void AddObservers(); | 57 void AddObservers(); |
| 62 void RemoveObservers(); | 58 void RemoveObservers(); |
| 63 | 59 |
| 64 // Called when the RenderViewHost of the hosted TabContents has changed, e.g. | 60 // Called when the RenderViewHost of the hosted TabContents has changed, e.g. |
| 65 // to show an interstitial page. | 61 // to show an interstitial page. |
| 66 void RenderViewHostChanged(RenderViewHost* old_host, | 62 void RenderViewHostChanged(RenderViewHost* old_host, |
| 67 RenderViewHost* new_host); | 63 RenderViewHost* new_host); |
| 68 | 64 |
| 69 // Called when a TabContents is destroyed. This gives us a chance to clean | 65 // Called when a TabContents is destroyed. This gives us a chance to clean |
| 70 // up our internal state if the TabContents is somehow destroyed before we | 66 // up our internal state if the TabContents is somehow destroyed before we |
| 71 // get notified. | 67 // get notified. |
| 72 void TabContentsDestroyed(TabContents* contents); | 68 void TabContentsDestroyed(TabContents* contents); |
| 73 | 69 |
| 74 // The current TabContents shown. | 70 // The current TabContents shown. |
| 75 TabContents* tab_contents_; | 71 TabContents* tab_contents_; |
| 76 | 72 |
| 77 DISALLOW_EVIL_CONSTRUCTORS(TabContentsContainerView); | 73 DISALLOW_EVIL_CONSTRUCTORS(TabContentsContainerView); |
| 78 }; | 74 }; |
| 79 | 75 |
| 80 #endif // #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ | 76 #endif // #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_CONTAINER_VIEW_H__ |
| OLD | NEW |