| OLD | NEW |
| 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_CLIENT_VIEW_H_ | 5 #ifndef CHROME_VIEWS_CLIENT_VIEW_H_ |
| 6 #define CHROME_VIEWS_CLIENT_VIEW_H_ | 6 #define CHROME_VIEWS_CLIENT_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/views/view.h" | 8 #include "chrome/views/view.h" |
| 9 | 9 |
| 10 namespace ChromeViews { | 10 namespace ChromeViews { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // implementation. If it is outside the bounds of this view, this must return | 43 // implementation. If it is outside the bounds of this view, this must return |
| 44 // HTNOWHERE to tell the caller to do further processing to determine where | 44 // HTNOWHERE to tell the caller to do further processing to determine where |
| 45 // in the non-client area it is (if it is). | 45 // in the non-client area it is (if it is). |
| 46 // Subclasses of ClientView can extend this logic by overriding this method | 46 // Subclasses of ClientView can extend this logic by overriding this method |
| 47 // to detect if regions within the client area count as parts of the "non- | 47 // to detect if regions within the client area count as parts of the "non- |
| 48 // client" area. A good example of this is the size box at the bottom right | 48 // client" area. A good example of this is the size box at the bottom right |
| 49 // corner of resizable dialog boxes. | 49 // corner of resizable dialog boxes. |
| 50 virtual int NonClientHitTest(const gfx::Point& point); | 50 virtual int NonClientHitTest(const gfx::Point& point); |
| 51 | 51 |
| 52 // Overridden from View: | 52 // Overridden from View: |
| 53 virtual void GetPreferredSize(CSize* out); | 53 virtual gfx::Size GetPreferredSize(); |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 // Overridden from View: | 56 // Overridden from View: |
| 57 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 57 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
| 58 virtual void DidChangeBounds(const CRect& previous, const CRect& current); | 58 virtual void DidChangeBounds(const CRect& previous, const CRect& current); |
| 59 virtual void Layout(); | 59 virtual void Layout(); |
| 60 | 60 |
| 61 // Accessors for private data members. | 61 // Accessors for private data members. |
| 62 Window* window() const { return window_; } | 62 Window* window() const { return window_; } |
| 63 void set_window(Window* window) { window_ = window; } | 63 void set_window(Window* window) { window_ = window; } |
| 64 View* contents_view() const { return contents_view_; } | 64 View* contents_view() const { return contents_view_; } |
| 65 void set_contents_view(View* contents_view) { | 65 void set_contents_view(View* contents_view) { |
| 66 contents_view_ = contents_view; | 66 contents_view_ = contents_view; |
| 67 } | 67 } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // The Window that hosts this ClientView. | 70 // The Window that hosts this ClientView. |
| 71 Window* window_; | 71 Window* window_; |
| 72 | 72 |
| 73 // The View that this ClientView contains. | 73 // The View that this ClientView contains. |
| 74 View* contents_view_; | 74 View* contents_view_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace ChromeViews | 77 } // namespace ChromeViews |
| 78 | 78 |
| 79 #endif // #ifndef CHROME_VIEWS_CLIENT_VIEW_H_ | 79 #endif // #ifndef CHROME_VIEWS_CLIENT_VIEW_H_ |
| OLD | NEW |