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