diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 04:44:59 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 04:44:59 +0000 |
commit | c8e1b96fa715d4c634a4fad71e93f67367a43da5 (patch) | |
tree | b134e3e77f51baca5a0f39a5004eeb13a4440417 /chrome | |
parent | 2430555a706bc467e4a46aadd44f0a20084f479f (diff) | |
download | chromium_src-c8e1b96fa715d4c634a4fad71e93f67367a43da5.zip chromium_src-c8e1b96fa715d4c634a4fad71e93f67367a43da5.tar.gz chromium_src-c8e1b96fa715d4c634a4fad71e93f67367a43da5.tar.bz2 |
Should not be able to construct a CustomFrameWindow directly. Should use CreateChromeWindow instead.
Move CustomFrameWindow's two constructors to the protected section. They should be called by subclasses only.
B=1293984
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/custom_frame_window.cc | 19 | ||||
-rw-r--r-- | chrome/views/custom_frame_window.h | 9 |
2 files changed, 17 insertions, 11 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc index 928947e..97c1c89 100644 --- a/chrome/views/custom_frame_window.cc +++ b/chrome/views/custom_frame_window.cc @@ -831,6 +831,17 @@ void DefaultNonClientView::InitClass() { /////////////////////////////////////////////////////////////////////////////// // CustomFrameWindow, public: +CustomFrameWindow::~CustomFrameWindow() { +} + +void CustomFrameWindow::ExecuteSystemMenuCommand(int command) { + if (command) + SendMessage(GetHWND(), WM_SYSCOMMAND, command, 0); +} + +/////////////////////////////////////////////////////////////////////////////// +// CustomFrameWindow, protected: + CustomFrameWindow::CustomFrameWindow(WindowDelegate* window_delegate) : Window(window_delegate), non_client_view_(new DefaultNonClientView(this)), @@ -845,14 +856,6 @@ CustomFrameWindow::CustomFrameWindow(WindowDelegate* window_delegate, InitClass(); } -CustomFrameWindow::~CustomFrameWindow() { -} - -void CustomFrameWindow::ExecuteSystemMenuCommand(int command) { - if (command) - SendMessage(GetHWND(), WM_SYSCOMMAND, command, 0); -} - /////////////////////////////////////////////////////////////////////////////// // CustomFrameWindow, Window overrides: diff --git a/chrome/views/custom_frame_window.h b/chrome/views/custom_frame_window.h index d61b6b8..2fad406 100644 --- a/chrome/views/custom_frame_window.h +++ b/chrome/views/custom_frame_window.h @@ -50,9 +50,6 @@ class NonClientView; //////////////////////////////////////////////////////////////////////////////// class CustomFrameWindow : public Window { public: - explicit CustomFrameWindow(WindowDelegate* window_delegate); - CustomFrameWindow(WindowDelegate* window_delegate, - NonClientView* non_client_view); virtual ~CustomFrameWindow(); // Executes the specified SC_command. @@ -69,6 +66,12 @@ class CustomFrameWindow : public Window { virtual void UpdateWindowTitle(); protected: + // Cannot construct one of these directly - use Window::CreateChromeWindow. + // Subclasses _must_ call one of these constructors. + explicit CustomFrameWindow(WindowDelegate* window_delegate); + CustomFrameWindow(WindowDelegate* window_delegate, + NonClientView* non_client_view); + // Overridden from Window: virtual void SizeWindowToDefault(); virtual void EnableClose(bool enable); |