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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 star_view_->SetToggled(on); 387 star_view_->SetToggled(on);
388 } 388 }
389 389
390 void LocationBarView::ShowStarBubble(const GURL& url, bool newly_bookmarked) { 390 void LocationBarView::ShowStarBubble(const GURL& url, bool newly_bookmarked) {
391 gfx::Rect screen_bounds(star_view_->GetImageBounds()); 391 gfx::Rect screen_bounds(star_view_->GetImageBounds());
392 // Compensate for some built-in padding in the Star image. 392 // Compensate for some built-in padding in the Star image.
393 screen_bounds.Inset(1, 1, 1, 2); 393 screen_bounds.Inset(1, 1, 1, 2);
394 gfx::Point origin(screen_bounds.origin()); 394 gfx::Point origin(screen_bounds.origin());
395 views::View::ConvertPointToScreen(star_view_, &origin); 395 views::View::ConvertPointToScreen(star_view_, &origin);
396 screen_bounds.set_origin(origin); 396 screen_bounds.set_origin(origin);
397 browser::ShowBookmarkBubbleView(GetWindow(), screen_bounds, star_view_, 397 browser::ShowBookmarkBubbleView(GetWidget(), screen_bounds, star_view_,
398 profile_, url, newly_bookmarked); 398 profile_, url, newly_bookmarked);
399 } 399 }
400 400
401 gfx::Point LocationBarView::GetLocationEntryOrigin() const { 401 gfx::Point LocationBarView::GetLocationEntryOrigin() const {
402 gfx::Point origin(location_entry_view_->bounds().origin()); 402 gfx::Point origin(location_entry_view_->bounds().origin());
403 // If the UI layout is RTL, the coordinate system is not transformed and 403 // If the UI layout is RTL, the coordinate system is not transformed and
404 // therefore we need to adjust the X coordinate so that bubble appears on the 404 // therefore we need to adjust the X coordinate so that bubble appears on the
405 // right hand side of the location bar. 405 // right hand side of the location bar.
406 if (base::i18n::IsRTL()) 406 if (base::i18n::IsRTL())
407 origin.set_x(width() - origin.x()); 407 origin.set_x(width() - origin.x());
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 Update(NULL); 1215 Update(NULL);
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 #if defined(OS_WIN) 1219 #if defined(OS_WIN)
1220 bool LocationBarView::HasValidSuggestText() const { 1220 bool LocationBarView::HasValidSuggestText() const {
1221 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1221 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1222 !suggested_text_view_->GetText().empty(); 1222 !suggested_text_view_->GetText().empty();
1223 } 1223 }
1224 #endif 1224 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/before_translate_infobar.cc ('k') | chrome/browser/ui/views/menu_item_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698