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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_delegate.h

Issue 3201008: Revert 57094 - Making window.focus()/blur() work only when there is a user ge... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // initial position. 61 // initial position.
62 virtual void AddNewContents(TabContents* source, 62 virtual void AddNewContents(TabContents* source,
63 TabContents* new_contents, 63 TabContents* new_contents,
64 WindowOpenDisposition disposition, 64 WindowOpenDisposition disposition,
65 const gfx::Rect& initial_pos, 65 const gfx::Rect& initial_pos,
66 bool user_gesture) = 0; 66 bool user_gesture) = 0;
67 67
68 // Selects the specified contents, bringing its container to the front. 68 // Selects the specified contents, bringing its container to the front.
69 virtual void ActivateContents(TabContents* contents) = 0; 69 virtual void ActivateContents(TabContents* contents) = 0;
70 70
71 // Deactivates the specified contents by deactivating its container and
72 // potentialy moving it to the back of the Z order.
73 virtual void DeactivateContents(TabContents* contents) = 0;
74
75 // Notifies the delegate that this contents is starting or is done loading 71 // Notifies the delegate that this contents is starting or is done loading
76 // some resource. The delegate should use this notification to represent 72 // some resource. The delegate should use this notification to represent
77 // loading feedback. See TabContents::is_loading() 73 // loading feedback. See TabContents::is_loading()
78 virtual void LoadingStateChanged(TabContents* source) = 0; 74 virtual void LoadingStateChanged(TabContents* source) = 0;
79 75
80 // Request the delegate to close this tab contents, and do whatever cleanup 76 // Request the delegate to close this tab contents, and do whatever cleanup
81 // it needs to do. 77 // it needs to do.
82 virtual void CloseContents(TabContents* source) = 0; 78 virtual void CloseContents(TabContents* source) = 0;
83 79
84 // Request the delegate to move this tab contents to the specified position 80 // Request the delegate to move this tab contents to the specified position
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // api calls through to the Browser process. 172 // api calls through to the Browser process.
177 virtual ExtensionFunctionDispatcher* CreateExtensionFunctionDispatcher( 173 virtual ExtensionFunctionDispatcher* CreateExtensionFunctionDispatcher(
178 RenderViewHost* render_view_host, 174 RenderViewHost* render_view_host,
179 const std::string& extension_id); 175 const std::string& extension_id);
180 176
181 // This is called when WebKit tells us that it is done tabbing through 177 // This is called when WebKit tells us that it is done tabbing through
182 // controls on the page. Provides a way for TabContentsDelegates to handle 178 // controls on the page. Provides a way for TabContentsDelegates to handle
183 // this. Returns true if the delegate successfully handled it. 179 // this. Returns true if the delegate successfully handled it.
184 virtual bool TakeFocus(bool reverse); 180 virtual bool TakeFocus(bool reverse);
185 181
182 // Called by WebKit to notify that the page requested the tab hosting window
183 // to be activated/deactivated (by calling window.focus()/blur()).
184 virtual void Activate();
185 virtual void Deactivate();
186
186 // Changes the blocked state of the tab at |index|. TabContents are 187 // Changes the blocked state of the tab at |index|. TabContents are
187 // considered blocked while displaying a tab modal dialog. During that time 188 // considered blocked while displaying a tab modal dialog. During that time
188 // renderer host will ignore any UI interaction within TabContent outside of 189 // renderer host will ignore any UI interaction within TabContent outside of
189 // the currently displaying dialog. 190 // the currently displaying dialog.
190 virtual void SetTabContentBlocked(TabContents* contents, bool blocked); 191 virtual void SetTabContentBlocked(TabContents* contents, bool blocked);
191 192
192 // Notification that |tab_contents| has gained focus. 193 // Notification that |tab_contents| has gained focus.
193 virtual void TabContentsFocused(TabContents* tab_content); 194 virtual void TabContentsFocused(TabContents* tab_content);
194 195
195 // Return much extra vertical space should be allotted to the 196 // Return much extra vertical space should be allotted to the
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // Sent when the user does a gesture that results in committing the match 281 // Sent when the user does a gesture that results in committing the match
281 // preview. The delegate should replace |source| with the |source|'s match 282 // preview. The delegate should replace |source| with the |source|'s match
282 // preview TabContents. 283 // preview TabContents.
283 virtual void CommitMatchPreview(TabContents* source); 284 virtual void CommitMatchPreview(TabContents* source);
284 285
285 protected: 286 protected:
286 virtual ~TabContentsDelegate(); 287 virtual ~TabContentsDelegate();
287 }; 288 };
288 289
289 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 290 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/tab_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698