Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/command_updater.h" 10 #include "chrome/browser/command_updater.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 forward_->set_tag(IDC_FORWARD); 215 forward_->set_tag(IDC_FORWARD);
216 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)); 216 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD));
217 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)); 217 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD));
218 forward_->set_id(VIEW_ID_FORWARD_BUTTON); 218 forward_->set_id(VIEW_ID_FORWARD_BUTTON);
219 219
220 // Have to create this before |reload_| as |reload_|'s constructor needs it. 220 // Have to create this before |reload_| as |reload_|'s constructor needs it.
221 location_bar_container_ = new LocationBarContainer( 221 location_bar_container_ = new LocationBarContainer(
222 location_bar_parent, 222 location_bar_parent,
223 chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())); 223 chrome::search::IsInstantExtendedAPIEnabled(browser_->profile()));
224 location_bar_ = new LocationBarView( 224 location_bar_ = new LocationBarView(
225 browser_,
225 browser_->profile(), 226 browser_->profile(),
226 browser_->command_controller()->command_updater(), 227 browser_->command_controller()->command_updater(),
227 model_, 228 model_,
228 this, 229 this,
229 browser_->search_model(), 230 browser_->search_model(),
230 (display_mode_ == DISPLAYMODE_LOCATION) ? 231 (display_mode_ == DISPLAYMODE_LOCATION) ?
231 LocationBarView::POPUP : LocationBarView::NORMAL); 232 LocationBarView::POPUP : LocationBarView::NORMAL);
232 // TODO(sky): if we want this to work on windows we need to make sure the 233 // TODO(sky): if we want this to work on windows we need to make sure the
233 // LocationBarContainer gets focus. This will involve tweaking view_ids. 234 // LocationBarContainer gets focus. This will involve tweaking view_ids.
234 // location_bar_->set_view_to_focus(location_bar_container_); 235 // location_bar_->set_view_to_focus(location_bar_container_);
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 // LocationBarContainer is not a child of the ToolbarView. 1006 // LocationBarContainer is not a child of the ToolbarView.
1006 gfx::Point origin(bounds.origin()); 1007 gfx::Point origin(bounds.origin());
1007 views::View::ConvertPointToView(this, location_bar_container_->parent(), 1008 views::View::ConvertPointToView(this, location_bar_container_->parent(),
1008 &origin); 1009 &origin);
1009 gfx::Rect target_bounds(origin, bounds.size()); 1010 gfx::Rect target_bounds(origin, bounds.size());
1010 if (location_bar_container_->GetTargetBounds() != target_bounds) { 1011 if (location_bar_container_->GetTargetBounds() != target_bounds) {
1011 location_bar_container_->SetInToolbar(true); 1012 location_bar_container_->SetInToolbar(true);
1012 location_bar_container_->SetBoundsRect(target_bounds); 1013 location_bar_container_->SetBoundsRect(target_bounds);
1013 } 1014 }
1014 } 1015 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698