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/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 return nullptr; | 364 return nullptr; |
365 } | 365 } |
366 | 366 |
367 void LocationBarView::SetStarToggled(bool on) { | 367 void LocationBarView::SetStarToggled(bool on) { |
368 if (star_view_) | 368 if (star_view_) |
369 star_view_->SetToggled(on); | 369 star_view_->SetToggled(on); |
370 } | 370 } |
371 | 371 |
372 gfx::Point LocationBarView::GetOmniboxViewOrigin() const { | 372 gfx::Point LocationBarView::GetOmniboxViewOrigin() const { |
373 gfx::Point origin(omnibox_view_->bounds().origin()); | 373 gfx::Point origin(omnibox_view_->origin()); |
374 origin.set_x(GetMirroredXInView(origin.x())); | 374 origin.set_x(GetMirroredXInView(origin.x())); |
375 views::View::ConvertPointToScreen(this, &origin); | 375 views::View::ConvertPointToScreen(this, &origin); |
376 return origin; | 376 return origin; |
377 } | 377 } |
378 | 378 |
379 void LocationBarView::SetImeInlineAutocompletion(const base::string16& text) { | 379 void LocationBarView::SetImeInlineAutocompletion(const base::string16& text) { |
380 ime_inline_autocomplete_view_->SetText(text); | 380 ime_inline_autocomplete_view_->SetText(text); |
381 ime_inline_autocomplete_view_->SetVisible(!text.empty()); | 381 ime_inline_autocomplete_view_->SetVisible(!text.empty()); |
382 } | 382 } |
383 | 383 |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 // LocationBarView, private TemplateURLServiceObserver implementation: | 1223 // LocationBarView, private TemplateURLServiceObserver implementation: |
1224 | 1224 |
1225 void LocationBarView::OnTemplateURLServiceChanged() { | 1225 void LocationBarView::OnTemplateURLServiceChanged() { |
1226 template_url_service_->RemoveObserver(this); | 1226 template_url_service_->RemoveObserver(this); |
1227 template_url_service_ = nullptr; | 1227 template_url_service_ = nullptr; |
1228 // If the browser is no longer active, let's not show the info bubble, as this | 1228 // If the browser is no longer active, let's not show the info bubble, as this |
1229 // would make the browser the active window again. | 1229 // would make the browser the active window again. |
1230 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1230 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
1231 ShowFirstRunBubble(); | 1231 ShowFirstRunBubble(); |
1232 } | 1232 } |
OLD | NEW |