| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/controls/table/native_table_win.h" | 5 #include "views/controls/table/native_table_win.h" | 
| 6 | 6 | 
| 7 #include <commctrl.h> | 7 #include <commctrl.h> | 
| 8 #include <windowsx.h> | 8 #include <windowsx.h> | 
| 9 | 9 | 
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" | 
| 11 #include "app/l10n_util_win.h" | 11 #include "app/l10n_util_win.h" | 
| 12 #include "app/table_model.h" | 12 #include "app/table_model.h" | 
|  | 13 #include "app/win/hwnd_util.h" | 
| 13 #include "base/logging.h" | 14 #include "base/logging.h" | 
| 14 #include "base/win_util.h" |  | 
| 15 #include "gfx/canvas_skia.h" | 15 #include "gfx/canvas_skia.h" | 
| 16 #include "gfx/favicon_size.h" | 16 #include "gfx/favicon_size.h" | 
| 17 #include "gfx/icon_util.h" | 17 #include "gfx/icon_util.h" | 
| 18 #include "skia/ext/skia_utils_win.h" | 18 #include "skia/ext/skia_utils_win.h" | 
| 19 #include "views/controls/table/table_view2.h" | 19 #include "views/controls/table/table_view2.h" | 
| 20 #include "views/controls/table/table_view_observer.h" | 20 #include "views/controls/table/table_view_observer.h" | 
| 21 #include "views/widget/widget.h" | 21 #include "views/widget/widget.h" | 
| 22 | 22 | 
| 23 namespace views { | 23 namespace views { | 
| 24 | 24 | 
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 401   } | 401   } | 
| 402 | 402 | 
| 403   if (!table_->resizable_columns()) { | 403   if (!table_->resizable_columns()) { | 
| 404     // To disable the resizing of columns we'll filter the events happening on | 404     // To disable the resizing of columns we'll filter the events happening on | 
| 405     // the header. We also need to intercept the HDM_LAYOUT to size the header | 405     // the header. We also need to intercept the HDM_LAYOUT to size the header | 
| 406     // for the Chrome headers. | 406     // for the Chrome headers. | 
| 407     HWND header = ListView_GetHeader(native_view()); | 407     HWND header = ListView_GetHeader(native_view()); | 
| 408     DCHECK(header); | 408     DCHECK(header); | 
| 409     SetWindowLongPtr(header, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); | 409     SetWindowLongPtr(header, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); | 
| 410     header_original_handler_ = | 410     header_original_handler_ = | 
| 411         win_util::SetWindowProc(header, &NativeTableWin::TableHeaderWndProc); | 411         app::win::SetWindowProc(header, &NativeTableWin::TableHeaderWndProc); | 
| 412   } | 412   } | 
| 413 | 413 | 
| 414   SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); | 414   SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); | 
| 415   original_handler_ = | 415   original_handler_ = | 
| 416       win_util::SetWindowProc(hwnd, &NativeTableWin::TableWndProc); | 416       app::win::SetWindowProc(hwnd, &NativeTableWin::TableWndProc); | 
| 417 | 417 | 
| 418   // Bug 964884: detach the IME attached to this window. | 418   // Bug 964884: detach the IME attached to this window. | 
| 419   // We should attach IMEs only when we need to input CJK strings. | 419   // We should attach IMEs only when we need to input CJK strings. | 
| 420   ::ImmAssociateContextEx(hwnd, NULL, 0); | 420   ::ImmAssociateContextEx(hwnd, NULL, 0); | 
| 421 | 421 | 
| 422   UpdateContentOffset(); | 422   UpdateContentOffset(); | 
| 423 } | 423 } | 
| 424 | 424 | 
| 425 //////////////////////////////////////////////////////////////////////////////// | 425 //////////////////////////////////////////////////////////////////////////////// | 
| 426 // NativeTableWin, private: | 426 // NativeTableWin, private: | 
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 900 | 900 | 
| 901 //////////////////////////////////////////////////////////////////////////////// | 901 //////////////////////////////////////////////////////////////////////////////// | 
| 902 // NativeButtonWrapper, public: | 902 // NativeButtonWrapper, public: | 
| 903 | 903 | 
| 904 // static | 904 // static | 
| 905 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { | 905 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { | 
| 906   return new NativeTableWin(table); | 906   return new NativeTableWin(table); | 
| 907 } | 907 } | 
| 908 | 908 | 
| 909 }  // namespace views | 909 }  // namespace views | 
| OLD | NEW | 
|---|