| 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 #include "chrome/browser/external_tab_container.h" | 5 #include "chrome/browser/external_tab_container.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/win_util.h" | 8 #include "base/win_util.h" |
| 9 #include "chrome/browser/automation/automation_provider.h" | 9 #include "chrome/browser/automation/automation_provider.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 void ExternalTabContainer::GetBounds(gfx::Rect* out, | 312 void ExternalTabContainer::GetBounds(gfx::Rect* out, |
| 313 bool including_frame) const { | 313 bool including_frame) const { |
| 314 CRect crect; | 314 CRect crect; |
| 315 GetWindowRect(&crect); | 315 GetWindowRect(&crect); |
| 316 *out = gfx::Rect(crect); | 316 *out = gfx::Rect(crect); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void ExternalTabContainer::MoveToFront(bool should_activate) { | |
| 320 } | |
| 321 | |
| 322 gfx::NativeView ExternalTabContainer::GetNativeView() const { | 319 gfx::NativeView ExternalTabContainer::GetNativeView() const { |
| 323 return m_hWnd; | 320 return m_hWnd; |
| 324 } | 321 } |
| 325 | 322 |
| 326 void ExternalTabContainer::PaintNow(const gfx::Rect& update_rect) { | 323 void ExternalTabContainer::PaintNow(const gfx::Rect& update_rect) { |
| 327 RECT native_update_rect = update_rect.ToRECT(); | 324 RECT native_update_rect = update_rect.ToRECT(); |
| 328 RedrawWindow(&native_update_rect, | 325 RedrawWindow(&native_update_rect, |
| 329 NULL, | 326 NULL, |
| 330 RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_NOERASE); | 327 RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_NOERASE); |
| 331 } | 328 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 if (!::IsWindow(parent_window)) { | 409 if (!::IsWindow(parent_window)) { |
| 413 return NULL; | 410 return NULL; |
| 414 } | 411 } |
| 415 if (!IsExternalTabContainer(parent_window)) { | 412 if (!IsExternalTabContainer(parent_window)) { |
| 416 return NULL; | 413 return NULL; |
| 417 } | 414 } |
| 418 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( | 415 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( |
| 419 GetProp(parent_window, kWindowObjectKey)); | 416 GetProp(parent_window, kWindowObjectKey)); |
| 420 return container; | 417 return container; |
| 421 } | 418 } |
| OLD | NEW |