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/find_in_page_controller.h" | 5 #include "chrome/browser/find_in_page_controller.h" |
6 | 6 |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/find_in_page_view.h" | 9 #include "chrome/browser/find_in_page_view.h" |
10 #include "chrome/browser/find_notification_details.h" | 10 #include "chrome/browser/find_notification_details.h" |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 toolbar_bounds = toolbar->bounds(); | 484 toolbar_bounds = toolbar->bounds(); |
485 else { | 485 else { |
486 CRect local_bounds; | 486 CRect local_bounds; |
487 toolbar->GetLocalBounds(&local_bounds, false); | 487 toolbar->GetLocalBounds(&local_bounds, false); |
488 toolbar_bounds = gfx::Rect(local_bounds); | 488 toolbar_bounds = gfx::Rect(local_bounds); |
489 } | 489 } |
490 // Need to convert toolbar bounds into ViewContainer coords because the | 490 // Need to convert toolbar bounds into ViewContainer coords because the |
491 // toolbar is the child of another view that isn't the top level view. | 491 // toolbar is the child of another view that isn't the top level view. |
492 // This is required to ensure correct positioning relative to the top,left | 492 // This is required to ensure correct positioning relative to the top,left |
493 // of the window. | 493 // of the window. |
494 CPoint topleft(0, 0); | 494 gfx::Point topleft; |
495 ChromeViews::View::ConvertPointToViewContainer(toolbar, &topleft); | 495 ChromeViews::View::ConvertPointToViewContainer(toolbar, &topleft); |
496 toolbar_bounds.Offset(topleft.x, topleft.y); | 496 toolbar_bounds.Offset(topleft.x(), topleft.y()); |
497 } | 497 } |
498 | 498 |
499 // If the bookmarks bar is available, we need to update our | 499 // If the bookmarks bar is available, we need to update our |
500 // position and paint accordingly | 500 // position and paint accordingly |
501 if (bookmark_bar) { | 501 if (bookmark_bar) { |
502 if (bookmark_bar->IsAlwaysShown()) { | 502 if (bookmark_bar->IsAlwaysShown()) { |
503 // If it's always on, don't try to blend with the toolbar. | 503 // If it's always on, don't try to blend with the toolbar. |
504 view_->SetToolbarBlend(false); | 504 view_->SetToolbarBlend(false); |
505 } else { | 505 } else { |
506 // Else it's on, but hidden (in which case we should try | 506 // Else it's on, but hidden (in which case we should try |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 // TODO(finnur): Once we fix issue 1307173 we should not remember any old | 684 // TODO(finnur): Once we fix issue 1307173 we should not remember any old |
685 // accelerator targets and just Register and Unregister when needed. | 685 // accelerator targets and just Register and Unregister when needed. |
686 DCHECK(old_accel_target_for_esc_ != NULL); | 686 DCHECK(old_accel_target_for_esc_ != NULL); |
687 ChromeViews::Accelerator escape(VK_ESCAPE, false, false, false); | 687 ChromeViews::Accelerator escape(VK_ESCAPE, false, false, false); |
688 ChromeViews::AcceleratorTarget* current_target = | 688 ChromeViews::AcceleratorTarget* current_target = |
689 focus_manager_->GetTargetForAccelerator(escape); | 689 focus_manager_->GetTargetForAccelerator(escape); |
690 if (current_target == this) | 690 if (current_target == this) |
691 focus_manager_->RegisterAccelerator(escape, old_accel_target_for_esc_); | 691 focus_manager_->RegisterAccelerator(escape, old_accel_target_for_esc_); |
692 } | 692 } |
693 | 693 |
OLD | NEW |