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

Unified Diff: chrome/views/window.h

Issue 27286: All views::Window objects must have a NonClientView, regardless of whether or... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/views/non_client_view.cc ('k') | chrome/views/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window.h
===================================================================
--- chrome/views/window.h (revision 10621)
+++ chrome/views/window.h (working copy)
@@ -6,6 +6,8 @@
#define CHROME_VIEWS_WINDOW_H__
#include "chrome/common/notification_registrar.h"
+#include "chrome/views/client_view.h"
+#include "chrome/views/non_client_view.h"
#include "chrome/views/widget_win.h"
namespace gfx {
@@ -15,7 +17,6 @@
namespace views {
-class ClientView;
class Client;
class NonClientView;
class WindowDelegate;
@@ -91,9 +92,6 @@
WindowDelegate* window_delegate() const { return window_delegate_; }
- // Returns the ClientView object used by this Window.
- ClientView* client_view() const { return client_view_; }
-
void set_focus_on_creation(bool focus_on_creation) {
focus_on_creation_ = focus_on_creation;
}
@@ -110,6 +108,9 @@
// The parent of this window.
HWND owning_window() const { return owning_hwnd_; }
+ // Shortcut to access the ClientView associated with this window.
+ ClientView* client_view() const { return non_client_view_->client_view(); }
+
// Returns the preferred size of the contents view of this window based on
// its localized size data. The width in cols is held in a localized string
// resource identified by |col_resource_id|, the height in the same fashion.
@@ -135,15 +136,6 @@
// centered on screen.
virtual void Init(HWND parent, const gfx::Rect& bounds);
- // Sets the specified view as the ClientView of this Window. The ClientView
- // is responsible for laying out the Window's contents view, as well as
- // performing basic hit-testing, and perhaps other responsibilities depending
- // on the implementation. The Window's view hierarchy takes ownership of the
- // ClientView unless the ClientView specifies otherwise. This must be called
- // only once, and after the native window has been created.
- // This is called by Init. |client_view| cannot be NULL.
- virtual void SetClientView(ClientView* client_view);
-
// Sizes the window to the default size specified by its ClientView.
virtual void SizeWindowToDefault();
@@ -152,8 +144,6 @@
// to exit.
virtual bool IsAppWindow() const { return false; }
- void set_client_view(ClientView* client_view) { client_view_ = client_view; }
-
// Shows the system menu at the specified screen point.
void RunSystemMenu(const gfx::Point& point);
@@ -183,6 +173,15 @@
}
private:
+ // Sets the specified view as the ClientView of this Window. The ClientView
+ // is responsible for laying out the Window's contents view, as well as
+ // performing basic hit-testing, and perhaps other responsibilities depending
+ // on the implementation. The Window's view hierarchy takes ownership of the
+ // ClientView unless the ClientView specifies otherwise. This must be called
+ // only once, and after the native window has been created.
+ // This is called by Init. |client_view| cannot be NULL.
+ void SetClientView(ClientView* client_view);
+
// Set the window as modal (by disabling all the other windows).
void BecomeModal();
@@ -219,11 +218,6 @@
static void InitClass();
static HCURSOR nwse_cursor_;
- // A ClientView object or subclass, responsible for sizing the contents view
- // of the window, hit testing and perhaps other tasks depending on the
- // implementation.
- ClientView* client_view_;
-
// Our window delegate (see Init method for documentation).
WindowDelegate* window_delegate_;
« no previous file with comments | « chrome/views/non_client_view.cc ('k') | chrome/views/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698