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_TAB_CONTENTS_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
7 | 7 |
8 #include "base/gfx/size.h" | 8 #include "base/gfx/size.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual bool IsDoingDrag() const; | 51 virtual bool IsDoingDrag() const; |
52 virtual void CancelDragAndCloseTab(); | 52 virtual void CancelDragAndCloseTab(); |
53 | 53 |
54 // Backend implementation of RenderViewHostDelegate::View. | 54 // Backend implementation of RenderViewHostDelegate::View. |
55 virtual void ShowContextMenu(const ContextMenuParams& params); | 55 virtual void ShowContextMenu(const ContextMenuParams& params); |
56 virtual void StartDragging(const WebDropData& drop_data, | 56 virtual void StartDragging(const WebDropData& drop_data, |
57 WebKit::WebDragOperationsMask operations); | 57 WebKit::WebDragOperationsMask operations); |
58 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 58 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
59 virtual void GotFocus(); | 59 virtual void GotFocus(); |
60 virtual void TakeFocus(bool reverse); | 60 virtual void TakeFocus(bool reverse); |
61 virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | |
62 | 61 |
63 // WidgetWin overridde. | 62 // WidgetWin overridde. |
64 virtual views::FocusManager* GetFocusManager(); | 63 virtual views::FocusManager* GetFocusManager(); |
65 | 64 |
66 private: | 65 private: |
67 // A helper method for closing the tab. | 66 // A helper method for closing the tab. |
68 void CloseTab(); | 67 void CloseTab(); |
69 | 68 |
70 // Windows events ------------------------------------------------------------ | 69 // Windows events ------------------------------------------------------------ |
71 | 70 |
(...skipping 30 matching lines...) Expand all Loading... |
102 | 101 |
103 // --------------------------------------------------------------------------- | 102 // --------------------------------------------------------------------------- |
104 | 103 |
105 // A drop target object that handles drags over this TabContents. | 104 // A drop target object that handles drags over this TabContents. |
106 scoped_refptr<WebDropTarget> drop_target_; | 105 scoped_refptr<WebDropTarget> drop_target_; |
107 | 106 |
108 // Used to render the sad tab. This will be non-NULL only when the sad tab is | 107 // Used to render the sad tab. This will be non-NULL only when the sad tab is |
109 // visible. | 108 // visible. |
110 SadTabView* sad_tab_; | 109 SadTabView* sad_tab_; |
111 | 110 |
112 // Whether to ignore the next CHAR keyboard event. | |
113 bool ignore_next_char_event_; | |
114 | |
115 // The id used in the ViewStorage to store the last focused view. | 111 // The id used in the ViewStorage to store the last focused view. |
116 int last_focused_view_storage_id_; | 112 int last_focused_view_storage_id_; |
117 | 113 |
118 // The context menu. Callbacks are asynchronous so we need to keep it around. | 114 // The context menu. Callbacks are asynchronous so we need to keep it around. |
119 scoped_ptr<RenderViewContextMenuWin> context_menu_; | 115 scoped_ptr<RenderViewContextMenuWin> context_menu_; |
120 | 116 |
121 // The FocusManager associated with this tab. Stored as it is not directly | 117 // The FocusManager associated with this tab. Stored as it is not directly |
122 // accessible when unparented. | 118 // accessible when unparented. |
123 views::FocusManager* focus_manager_; | 119 views::FocusManager* focus_manager_; |
124 | 120 |
125 // |drag_source_| is our callback interface passed to the system when we | 121 // |drag_source_| is our callback interface passed to the system when we |
126 // want to initiate a drag and drop operation. We use it to tell if a | 122 // want to initiate a drag and drop operation. We use it to tell if a |
127 // drag operation is happening. | 123 // drag operation is happening. |
128 scoped_refptr<WebDragSource> drag_source_; | 124 scoped_refptr<WebDragSource> drag_source_; |
129 | 125 |
130 // Set to true if we want to close the tab after the system drag operation | 126 // Set to true if we want to close the tab after the system drag operation |
131 // has finished. | 127 // has finished. |
132 bool close_tab_after_drag_ends_; | 128 bool close_tab_after_drag_ends_; |
133 | 129 |
134 // Used to close the tab after the stack has unwound. | 130 // Used to close the tab after the stack has unwound. |
135 base::OneShotTimer<TabContentsViewWin> close_tab_timer_; | 131 base::OneShotTimer<TabContentsViewWin> close_tab_timer_; |
136 | 132 |
137 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin); | 133 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin); |
138 }; | 134 }; |
139 | 135 |
140 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ | 136 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
OLD | NEW |