| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/event_disposition.h" | 10 #include "chrome/browser/event_disposition.h" |
| 11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 14 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
| 15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
| 16 #include "chrome/browser/ui/global_error_service.h" | 16 #include "chrome/browser/ui/global_error_service.h" |
| 17 #include "chrome/browser/ui/global_error_service_factory.h" | 17 #include "chrome/browser/ui/global_error_service_factory.h" |
| 18 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 18 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 19 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 19 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
| 20 #include "chrome/browser/ui/view_ids.h" | 20 #include "chrome/browser/ui/view_ids.h" |
| 21 #include "chrome/browser/ui/views/browser_actions_container.h" | 21 #include "chrome/browser/ui/views/browser_actions_container.h" |
| 22 #include "chrome/browser/ui/views/location_bar/location_bar_container.h" |
| 22 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h" | 23 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h" |
| 23 #include "chrome/browser/ui/views/wrench_menu.h" | 24 #include "chrome/browser/ui/views/wrench_menu.h" |
| 24 #include "chrome/browser/upgrade_detector.h" | 25 #include "chrome/browser/upgrade_detector.h" |
| 25 #include "chrome/common/chrome_notification_types.h" | 26 #include "chrome/common/chrome_notification_types.h" |
| 26 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 27 #include "content/public/browser/browser_accessibility_state.h" | 28 #include "content/public/browser/browser_accessibility_state.h" |
| 28 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
| 29 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
| 30 #include "grit/chromium_strings.h" | 31 #include "grit/chromium_strings.h" |
| 31 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 //////////////////////////////////////////////////////////////////////////////// | 117 //////////////////////////////////////////////////////////////////////////////// |
| 117 // ToolbarView, public: | 118 // ToolbarView, public: |
| 118 | 119 |
| 119 ToolbarView::ToolbarView(Browser* browser) | 120 ToolbarView::ToolbarView(Browser* browser) |
| 120 : model_(browser->toolbar_model()), | 121 : model_(browser->toolbar_model()), |
| 121 back_(NULL), | 122 back_(NULL), |
| 122 forward_(NULL), | 123 forward_(NULL), |
| 123 reload_(NULL), | 124 reload_(NULL), |
| 124 home_(NULL), | 125 home_(NULL), |
| 125 location_bar_(NULL), | 126 location_bar_(NULL), |
| 127 location_bar_container_(NULL), |
| 126 browser_actions_(NULL), | 128 browser_actions_(NULL), |
| 127 app_menu_(NULL), | 129 app_menu_(NULL), |
| 128 browser_(browser), | 130 browser_(browser), |
| 129 profiles_menu_contents_(NULL) { | 131 profiles_menu_contents_(NULL) { |
| 130 set_id(VIEW_ID_TOOLBAR); | 132 set_id(VIEW_ID_TOOLBAR); |
| 131 | 133 |
| 132 browser_->command_updater()->AddCommandObserver(IDC_BACK, this); | 134 browser_->command_updater()->AddCommandObserver(IDC_BACK, this); |
| 133 browser_->command_updater()->AddCommandObserver(IDC_FORWARD, this); | 135 browser_->command_updater()->AddCommandObserver(IDC_FORWARD, this); |
| 134 browser_->command_updater()->AddCommandObserver(IDC_HOME, this); | 136 browser_->command_updater()->AddCommandObserver(IDC_HOME, this); |
| 135 | 137 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 153 registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, | 155 registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
| 154 content::Source<Profile>(browser_->profile())); | 156 content::Source<Profile>(browser_->profile())); |
| 155 } | 157 } |
| 156 | 158 |
| 157 ToolbarView::~ToolbarView() { | 159 ToolbarView::~ToolbarView() { |
| 158 // NOTE: Don't remove the command observers here. This object gets destroyed | 160 // NOTE: Don't remove the command observers here. This object gets destroyed |
| 159 // after the Browser (which owns the CommandUpdater), so the CommandUpdater is | 161 // after the Browser (which owns the CommandUpdater), so the CommandUpdater is |
| 160 // already gone. | 162 // already gone. |
| 161 } | 163 } |
| 162 | 164 |
| 163 void ToolbarView::Init() { | 165 void ToolbarView::Init(views::View* location_bar_parent) { |
| 164 back_menu_model_.reset(new BackForwardMenuModel( | 166 back_menu_model_.reset(new BackForwardMenuModel( |
| 165 browser_, BackForwardMenuModel::BACKWARD_MENU)); | 167 browser_, BackForwardMenuModel::BACKWARD_MENU)); |
| 166 forward_menu_model_.reset(new BackForwardMenuModel( | 168 forward_menu_model_.reset(new BackForwardMenuModel( |
| 167 browser_, BackForwardMenuModel::FORWARD_MENU)); | 169 browser_, BackForwardMenuModel::FORWARD_MENU)); |
| 168 back_ = new views::ButtonDropDown(this, back_menu_model_.get()); | 170 back_ = new views::ButtonDropDown(this, back_menu_model_.get()); |
| 169 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | | 171 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | |
| 170 ui::EF_MIDDLE_MOUSE_BUTTON); | 172 ui::EF_MIDDLE_MOUSE_BUTTON); |
| 171 back_->set_tag(IDC_BACK); | 173 back_->set_tag(IDC_BACK); |
| 172 back_->SetImageAlignment(views::ImageButton::ALIGN_RIGHT, | 174 back_->SetImageAlignment(views::ImageButton::ALIGN_RIGHT, |
| 173 views::ImageButton::ALIGN_TOP); | 175 views::ImageButton::ALIGN_TOP); |
| 174 back_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_BACK)); | 176 back_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_BACK)); |
| 175 back_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)); | 177 back_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)); |
| 176 back_->set_id(VIEW_ID_BACK_BUTTON); | 178 back_->set_id(VIEW_ID_BACK_BUTTON); |
| 177 | 179 |
| 178 forward_ = new views::ButtonDropDown(this, forward_menu_model_.get()); | 180 forward_ = new views::ButtonDropDown(this, forward_menu_model_.get()); |
| 179 forward_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | | 181 forward_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | |
| 180 ui::EF_MIDDLE_MOUSE_BUTTON); | 182 ui::EF_MIDDLE_MOUSE_BUTTON); |
| 181 forward_->set_tag(IDC_FORWARD); | 183 forward_->set_tag(IDC_FORWARD); |
| 182 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)); | 184 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)); |
| 183 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)); | 185 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)); |
| 184 forward_->set_id(VIEW_ID_FORWARD_BUTTON); | 186 forward_->set_id(VIEW_ID_FORWARD_BUTTON); |
| 185 | 187 |
| 186 // Have to create this before |reload_| as |reload_|'s constructor needs it. | 188 // Have to create this before |reload_| as |reload_|'s constructor needs it. |
| 189 location_bar_container_ = new LocationBarContainer(location_bar_parent); |
| 187 location_bar_ = new LocationBarView( | 190 location_bar_ = new LocationBarView( |
| 188 browser_->profile(), | 191 browser_->profile(), |
| 189 browser_->command_updater(), | 192 browser_->command_updater(), |
| 190 model_, | 193 model_, |
| 191 this, | 194 this, |
| 192 (display_mode_ == DISPLAYMODE_LOCATION) ? | 195 (display_mode_ == DISPLAYMODE_LOCATION) ? |
| 193 LocationBarView::POPUP : LocationBarView::NORMAL); | 196 LocationBarView::POPUP : LocationBarView::NORMAL); |
| 197 location_bar_->set_view_to_focus(location_bar_container_); |
| 198 location_bar_container_->SetLocationBarView(location_bar_); |
| 194 | 199 |
| 195 reload_ = new ReloadButton(location_bar_, browser_->command_updater()); | 200 reload_ = new ReloadButton(location_bar_, browser_->command_updater()); |
| 196 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | | 201 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | |
| 197 ui::EF_MIDDLE_MOUSE_BUTTON); | 202 ui::EF_MIDDLE_MOUSE_BUTTON); |
| 198 reload_->set_tag(IDC_RELOAD); | 203 reload_->set_tag(IDC_RELOAD); |
| 199 reload_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD)); | 204 reload_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD)); |
| 200 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)); | 205 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)); |
| 201 reload_->set_id(VIEW_ID_RELOAD_BUTTON); | 206 reload_->set_id(VIEW_ID_RELOAD_BUTTON); |
| 202 | 207 |
| 203 home_ = new views::ImageButton(this); | 208 home_ = new views::ImageButton(this); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 227 if (ShouldShowUpgradeRecommended() || ShouldShowIncompatibilityWarning()) { | 232 if (ShouldShowUpgradeRecommended() || ShouldShowIncompatibilityWarning()) { |
| 228 UpdateAppMenuState(); | 233 UpdateAppMenuState(); |
| 229 } | 234 } |
| 230 LoadImages(); | 235 LoadImages(); |
| 231 | 236 |
| 232 // Always add children in order from left to right, for accessibility. | 237 // Always add children in order from left to right, for accessibility. |
| 233 AddChildView(back_); | 238 AddChildView(back_); |
| 234 AddChildView(forward_); | 239 AddChildView(forward_); |
| 235 AddChildView(reload_); | 240 AddChildView(reload_); |
| 236 AddChildView(home_); | 241 AddChildView(home_); |
| 237 AddChildView(location_bar_); | |
| 238 AddChildView(browser_actions_); | 242 AddChildView(browser_actions_); |
| 239 AddChildView(app_menu_); | 243 AddChildView(app_menu_); |
| 240 | 244 |
| 241 location_bar_->Init(); | 245 location_bar_->Init(); |
| 242 show_home_button_.Init(prefs::kShowHomeButton, | 246 show_home_button_.Init(prefs::kShowHomeButton, |
| 243 browser_->profile()->GetPrefs(), this); | 247 browser_->profile()->GetPrefs(), this); |
| 244 browser_actions_->Init(); | 248 browser_actions_->Init(); |
| 245 | 249 |
| 246 // Accessibility specific tooltip text. | 250 // Accessibility specific tooltip text. |
| 247 if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { | 251 if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // ToolbarView, views::View overrides: | 536 // ToolbarView, views::View overrides: |
| 533 | 537 |
| 534 gfx::Size ToolbarView::GetPreferredSize() { | 538 gfx::Size ToolbarView::GetPreferredSize() { |
| 535 if (IsDisplayModeNormal()) { | 539 if (IsDisplayModeNormal()) { |
| 536 int min_width = kLeftEdgeSpacing + | 540 int min_width = kLeftEdgeSpacing + |
| 537 back_->GetPreferredSize().width() + kButtonSpacing + | 541 back_->GetPreferredSize().width() + kButtonSpacing + |
| 538 forward_->GetPreferredSize().width() + kButtonSpacing + | 542 forward_->GetPreferredSize().width() + kButtonSpacing + |
| 539 reload_->GetPreferredSize().width() + kStandardSpacing + | 543 reload_->GetPreferredSize().width() + kStandardSpacing + |
| 540 (show_home_button_.GetValue() ? | 544 (show_home_button_.GetValue() ? |
| 541 (home_->GetPreferredSize().width() + kButtonSpacing) : 0) + | 545 (home_->GetPreferredSize().width() + kButtonSpacing) : 0) + |
| 542 location_bar_->GetPreferredSize().width() + | 546 location_bar_container_->GetPreferredSize().width() + |
| 543 browser_actions_->GetPreferredSize().width() + | 547 browser_actions_->GetPreferredSize().width() + |
| 544 app_menu_->GetPreferredSize().width() + kRightEdgeSpacing; | 548 app_menu_->GetPreferredSize().width() + kRightEdgeSpacing; |
| 545 | 549 |
| 546 CR_DEFINE_STATIC_LOCAL(gfx::ImageSkia, normal_background, ()); | 550 CR_DEFINE_STATIC_LOCAL(gfx::ImageSkia, normal_background, ()); |
| 547 if (normal_background.isNull()) { | 551 if (normal_background.isNull()) { |
| 548 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 552 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 549 normal_background = *rb.GetImageSkiaNamed(IDR_CONTENT_TOP_CENTER); | 553 normal_background = *rb.GetImageSkiaNamed(IDR_CONTENT_TOP_CENTER); |
| 550 } | 554 } |
| 551 | 555 |
| 552 return gfx::Size(min_width, | 556 return gfx::Size(min_width, |
| 553 normal_background.height() - kContentShadowHeight); | 557 normal_background.height() - kContentShadowHeight); |
| 554 } | 558 } |
| 555 | 559 |
| 556 int vertical_spacing = PopupTopSpacing() + | 560 int vertical_spacing = PopupTopSpacing() + |
| 557 (GetWidget()->ShouldUseNativeFrame() ? | 561 (GetWidget()->ShouldUseNativeFrame() ? |
| 558 kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass); | 562 kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass); |
| 559 return gfx::Size(0, location_bar_->GetPreferredSize().height() + | 563 return gfx::Size(0, location_bar_container_->GetPreferredSize().height() + |
| 560 vertical_spacing); | 564 vertical_spacing); |
| 561 } | 565 } |
| 562 | 566 |
| 563 void ToolbarView::Layout() { | 567 void ToolbarView::Layout() { |
| 564 // If we have not been initialized yet just do nothing. | 568 // If we have not been initialized yet just do nothing. |
| 565 if (back_ == NULL) | 569 if (back_ == NULL) |
| 566 return; | 570 return; |
| 567 | 571 |
| 568 bool maximized = browser_->window() && browser_->window()->IsMaximized(); | 572 bool maximized = browser_->window() && browser_->window()->IsMaximized(); |
| 569 if (!IsDisplayModeNormal()) { | 573 if (!IsDisplayModeNormal()) { |
| 570 int edge_width = maximized ? | 574 int edge_width = maximized ? |
| 571 0 : kPopupBackgroundEdge->width(); // See OnPaint(). | 575 0 : kPopupBackgroundEdge->width(); // See OnPaint(). |
| 572 location_bar_->SetBounds(edge_width, PopupTopSpacing(), | 576 SetLocationBarContainerBounds(gfx::Rect(edge_width, PopupTopSpacing(), |
| 573 width() - (edge_width * 2), location_bar_->GetPreferredSize().height()); | 577 std::max(0, width() - (edge_width * 2)), |
| 578 location_bar_container_->GetPreferredSize().height())); |
| 574 return; | 579 return; |
| 575 } | 580 } |
| 576 | 581 |
| 577 int child_y = std::min(kVertSpacing, height()); | 582 int child_y = std::min(kVertSpacing, height()); |
| 578 // We assume all child elements are the same height. | 583 // We assume all child elements are the same height. |
| 579 int child_height = | 584 int child_height = |
| 580 std::min(back_->GetPreferredSize().height(), height() - child_y); | 585 std::min(back_->GetPreferredSize().height(), height() - child_y); |
| 581 | 586 |
| 582 // If the window is maximized, we extend the back button to the left so that | 587 // If the window is maximized, we extend the back button to the left so that |
| 583 // clicking on the left-most pixel will activate the back button. | 588 // clicking on the left-most pixel will activate the back button. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 606 home_->SetVisible(false); | 611 home_->SetVisible(false); |
| 607 home_->SetBounds(reload_->x() + reload_->width(), child_y, 0, child_height); | 612 home_->SetBounds(reload_->x() + reload_->width(), child_y, 0, child_height); |
| 608 } | 613 } |
| 609 | 614 |
| 610 int browser_actions_width = browser_actions_->GetPreferredSize().width(); | 615 int browser_actions_width = browser_actions_->GetPreferredSize().width(); |
| 611 int app_menu_width = app_menu_->GetPreferredSize().width(); | 616 int app_menu_width = app_menu_->GetPreferredSize().width(); |
| 612 int location_x = home_->x() + home_->width() + kStandardSpacing; | 617 int location_x = home_->x() + home_->width() + kStandardSpacing; |
| 613 int available_width = width() - kRightEdgeSpacing - app_menu_width - | 618 int available_width = width() - kRightEdgeSpacing - app_menu_width - |
| 614 browser_actions_width - location_x; | 619 browser_actions_width - location_x; |
| 615 int location_y = std::min(location_bar_vert_spacing(), height()); | 620 int location_y = std::min(location_bar_vert_spacing(), height()); |
| 616 int location_bar_height = location_bar_->GetPreferredSize().height(); | 621 int location_bar_height = |
| 622 location_bar_container_->GetPreferredSize().height(); |
| 617 | 623 |
| 618 location_bar_->SetBounds(location_x, location_y, std::max(available_width, 0), | 624 gfx::Rect location_bar_container_bounds( |
| 619 location_bar_height); | 625 location_x, location_y, std::max(available_width, 0), |
| 626 location_bar_height); |
| 627 SetLocationBarContainerBounds(location_bar_container_bounds); |
| 620 | 628 |
| 621 browser_actions_->SetBounds(location_bar_->x() + location_bar_->width(), 0, | 629 browser_actions_->SetBounds(location_bar_container_bounds.right(), 0, |
| 622 browser_actions_width, height()); | 630 browser_actions_width, height()); |
| 623 // The browser actions need to do a layout explicitly, because when an | 631 // The browser actions need to do a layout explicitly, because when an |
| 624 // extension is loaded/unloaded/changed, BrowserActionContainer removes and | 632 // extension is loaded/unloaded/changed, BrowserActionContainer removes and |
| 625 // re-adds everything, regardless of whether it has a page action. For a | 633 // re-adds everything, regardless of whether it has a page action. For a |
| 626 // page action, browser action bounds do not change, as a result of which | 634 // page action, browser action bounds do not change, as a result of which |
| 627 // SetBounds does not do a layout at all. | 635 // SetBounds does not do a layout at all. |
| 628 // TODO(sidchat): Rework the above behavior so that explicit layout is not | 636 // TODO(sidchat): Rework the above behavior so that explicit layout is not |
| 629 // required. | 637 // required. |
| 630 browser_actions_->Layout(); | 638 browser_actions_->Layout(); |
| 631 | 639 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 accname_app = l10n_util::GetStringFUTF16( | 828 accname_app = l10n_util::GetStringFUTF16( |
| 821 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); | 829 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); |
| 822 } | 830 } |
| 823 app_menu_->SetAccessibleName(accname_app); | 831 app_menu_->SetAccessibleName(accname_app); |
| 824 | 832 |
| 825 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); | 833 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); |
| 826 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); | 834 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); |
| 827 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); | 835 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); |
| 828 SchedulePaint(); | 836 SchedulePaint(); |
| 829 } | 837 } |
| 838 |
| 839 void ToolbarView::SetLocationBarContainerBounds( |
| 840 const gfx::Rect& bounds) { |
| 841 if (location_bar_container_->IsAnimating()) |
| 842 return; |
| 843 |
| 844 // LocationBarContainer is not a child of the ToolbarView. |
| 845 gfx::Point origin(bounds.origin()); |
| 846 views::View::ConvertPointToView(this, location_bar_container_->parent(), |
| 847 &origin); |
| 848 gfx::Rect target_bounds(origin, bounds.size()); |
| 849 if (location_bar_container_->GetTargetBounds() != target_bounds) |
| 850 location_bar_container_->SetBoundsRect(target_bounds); |
| 851 } |
| OLD | NEW |