| 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 VIEWS_CONTROLS_HWND_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_HWND_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_HWND_VIEW_H_ | 6 #define VIEWS_CONTROLS_HWND_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "views/controls/native_view_host.h" | 10 #include "views/controls/native_view_host.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // This object should be added to the view hierarchy before calling this | 34 // This object should be added to the view hierarchy before calling this |
| 35 // function, which will expect the parent to be valid. | 35 // function, which will expect the parent to be valid. |
| 36 void Attach(HWND hwnd); | 36 void Attach(HWND hwnd); |
| 37 | 37 |
| 38 // Detach the attached window handle. It will no longer be updated | 38 // Detach the attached window handle. It will no longer be updated |
| 39 void Detach(); | 39 void Detach(); |
| 40 | 40 |
| 41 // TODO(sky): convert this to native_view(). | 41 // TODO(sky): convert this to native_view(). |
| 42 HWND GetHWND() const { return native_view(); } | 42 HWND GetHWND() const { return native_view(); } |
| 43 | 43 |
| 44 virtual void Paint(ChromeCanvas* canvas); | 44 virtual void Paint(gfx::Canvas* canvas); |
| 45 | 45 |
| 46 // Overridden from View. | 46 // Overridden from View. |
| 47 virtual std::string GetClassName() const; | 47 virtual std::string GetClassName() const; |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 50 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 51 | 51 |
| 52 virtual void Focus(); | 52 virtual void Focus(); |
| 53 | 53 |
| 54 // NativeHostView overrides. | 54 // NativeHostView overrides. |
| 55 virtual void InstallClip(int x, int y, int w, int h); | 55 virtual void InstallClip(int x, int y, int w, int h); |
| 56 virtual void UninstallClip(); | 56 virtual void UninstallClip(); |
| 57 virtual void ShowWidget(int x, int y, int w, int h); | 57 virtual void ShowWidget(int x, int y, int w, int h); |
| 58 virtual void HideWidget(); | 58 virtual void HideWidget(); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 DISALLOW_COPY_AND_ASSIGN(HWNDView); | 61 DISALLOW_COPY_AND_ASSIGN(HWNDView); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace views | 64 } // namespace views |
| 65 | 65 |
| 66 #endif // VIEWS_CONTROLS_HWND_VIEW_H_ | 66 #endif // VIEWS_CONTROLS_HWND_VIEW_H_ |
| OLD | NEW |