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

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

Issue 8539027: Add SwappedOut to TabContentsDelegate to allow us to correctly delete TabContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux compile 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_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully 112 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully
113 // loaded). 113 // loaded).
114 // Note that to receive this notification, you must have called 114 // Note that to receive this notification, you must have called
115 // SetReportLoadProgressEnabled(true) in the render view. 115 // SetReportLoadProgressEnabled(true) in the render view.
116 virtual void LoadProgressChanged(double progress); 116 virtual void LoadProgressChanged(double progress);
117 117
118 // Request the delegate to close this tab contents, and do whatever cleanup 118 // Request the delegate to close this tab contents, and do whatever cleanup
119 // it needs to do. 119 // it needs to do.
120 virtual void CloseContents(TabContents* source); 120 virtual void CloseContents(TabContents* source);
121 121
122 // Informs the delegate that the underlying RenderViewHost has been swapped
123 // out so it can perform any cleanup necessary.
124 virtual void SwappedOut(TabContents* source);
125
122 // Request the delegate to move this tab contents to the specified position 126 // Request the delegate to move this tab contents to the specified position
123 // in screen coordinates. 127 // in screen coordinates.
124 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); 128 virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
125 129
126 // Causes the delegate to detach |source| and clean up any internal data 130 // Causes the delegate to detach |source| and clean up any internal data
127 // pointing to it. After this call ownership of |source| passes to the 131 // pointing to it. After this call ownership of |source| passes to the
128 // caller, and it is safe to call "source->set_delegate(someone_else);". 132 // caller, and it is safe to call "source->set_delegate(someone_else);".
129 virtual void DetachContents(TabContents* source); 133 virtual void DetachContents(TabContents* source);
130 134
131 // Called to determine if the TabContents is contained in a popup window 135 // Called to determine if the TabContents is contained in a popup window
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 void Attach(TabContents* source); 380 void Attach(TabContents* source);
377 381
378 // Called when |this| is no longer the TabContentsDelegate for |source|. 382 // Called when |this| is no longer the TabContentsDelegate for |source|.
379 void Detach(TabContents* source); 383 void Detach(TabContents* source);
380 384
381 // The TabContents that this is currently a delegate for. 385 // The TabContents that this is currently a delegate for.
382 std::set<TabContents*> attached_contents_; 386 std::set<TabContents*> attached_contents_;
383 }; 387 };
384 388
385 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 389 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698