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

Side by Side Diff: chrome/views/window/window_delegate.h

Issue 113123: Fleshes out WidgetGTK and WindowGTK a bit more. This is still vary... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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) 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_VIEWS_WINDOW_WINDOW_DELEGATE_H_ 5 #ifndef CHROME_VIEWS_WINDOW_WINDOW_DELEGATE_H_
6 #define CHROME_VIEWS_WINDOW_WINDOW_DELEGATE_H_ 6 #define CHROME_VIEWS_WINDOW_WINDOW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // An accessor to the Window this delegate is bound to. 141 // An accessor to the Window this delegate is bound to.
142 Window* window() const { return window_.get(); } 142 Window* window() const { return window_.get(); }
143 143
144 protected: 144 protected:
145 // Releases the Window* we maintain. This should be done by a delegate in its 145 // Releases the Window* we maintain. This should be done by a delegate in its
146 // WindowClosing handler if it intends to be re-cycled to be used on a 146 // WindowClosing handler if it intends to be re-cycled to be used on a
147 // different Window. 147 // different Window.
148 void ReleaseWindow(); 148 void ReleaseWindow();
149 149
150 private: 150 private:
151 friend class WindowGtk;
151 friend class WindowWin; 152 friend class WindowWin;
152 // This is a little unusual. We use a scoped_ptr here because it's 153 // This is a little unusual. We use a scoped_ptr here because it's
153 // initialized to NULL automatically. We do this because we want to allow 154 // initialized to NULL automatically. We do this because we want to allow
154 // people using this helper to not have to call a ctor on this object. 155 // people using this helper to not have to call a ctor on this object.
155 // Instead we just release the owning ref this pointer has when we are 156 // Instead we just release the owning ref this pointer has when we are
156 // destroyed. 157 // destroyed.
157 scoped_ptr<Window> window_; 158 scoped_ptr<Window> window_;
158 }; 159 };
159 160
160 } // namespace views 161 } // namespace views
161 162
162 #endif // CHROME_VIEWS_WINDOW_WINDOW_DELEGATE_H_ 163 #endif // CHROME_VIEWS_WINDOW_WINDOW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698