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

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

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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
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/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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h" 51 #include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h"
52 #include "chrome/browser/ui/views/location_bar/search_button.h" 52 #include "chrome/browser/ui/views/location_bar/search_button.h"
53 #include "chrome/browser/ui/views/location_bar/selected_keyword_view.h" 53 #include "chrome/browser/ui/views/location_bar/selected_keyword_view.h"
54 #include "chrome/browser/ui/views/location_bar/star_view.h" 54 #include "chrome/browser/ui/views/location_bar/star_view.h"
55 #include "chrome/browser/ui/views/location_bar/translate_icon_view.h" 55 #include "chrome/browser/ui/views/location_bar/translate_icon_view.h"
56 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 56 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
57 #include "chrome/browser/ui/views/location_bar/zoom_view.h" 57 #include "chrome/browser/ui/views/location_bar/zoom_view.h"
58 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" 58 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
59 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h" 59 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
60 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" 60 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
61 #include "chrome/browser/ui/zoom/zoom_controller.h"
62 #include "chrome/common/pref_names.h" 61 #include "chrome/common/pref_names.h"
63 #include "chrome/grit/generated_resources.h" 62 #include "chrome/grit/generated_resources.h"
64 #include "components/search_engines/template_url.h" 63 #include "components/search_engines/template_url.h"
65 #include "components/search_engines/template_url_service.h" 64 #include "components/search_engines/template_url_service.h"
66 #include "components/translate/core/browser/language_state.h" 65 #include "components/translate/core/browser/language_state.h"
66 #include "components/ui/zoom/zoom_controller.h"
67 #include "content/public/browser/render_widget_host_view.h" 67 #include "content/public/browser/render_widget_host_view.h"
68 #include "content/public/browser/web_contents.h" 68 #include "content/public/browser/web_contents.h"
69 #include "extensions/browser/extension_registry.h" 69 #include "extensions/browser/extension_registry.h"
70 #include "extensions/common/feature_switch.h" 70 #include "extensions/common/feature_switch.h"
71 #include "extensions/common/permissions/permissions_data.h" 71 #include "extensions/common/permissions/permissions_data.h"
72 #include "grit/components_scaled_resources.h" 72 #include "grit/components_scaled_resources.h"
73 #include "grit/theme_resources.h" 73 #include "grit/theme_resources.h"
74 #include "ui/accessibility/ax_view_state.h" 74 #include "ui/accessibility/ax_view_state.h"
75 #include "ui/base/dragdrop/drag_drop_types.h" 75 #include "ui/base/dragdrop/drag_drop_types.h"
76 #include "ui/base/l10n/l10n_util.h" 76 #include "ui/base/l10n/l10n_util.h"
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 } 1131 }
1132 return changed; 1132 return changed;
1133 } 1133 }
1134 1134
1135 bool LocationBarView::RefreshZoomView() { 1135 bool LocationBarView::RefreshZoomView() {
1136 DCHECK(zoom_view_); 1136 DCHECK(zoom_view_);
1137 WebContents* web_contents = GetWebContents(); 1137 WebContents* web_contents = GetWebContents();
1138 if (!web_contents) 1138 if (!web_contents)
1139 return false; 1139 return false;
1140 const bool was_visible = zoom_view_->visible(); 1140 const bool was_visible = zoom_view_->visible();
1141 zoom_view_->Update(ZoomController::FromWebContents(web_contents)); 1141 zoom_view_->Update(ui_zoom::ZoomController::FromWebContents(web_contents));
1142 if (!zoom_view_->visible()) 1142 if (!zoom_view_->visible())
1143 ZoomBubbleView::CloseBubble(); 1143 ZoomBubbleView::CloseBubble();
1144 return was_visible != zoom_view_->visible(); 1144 return was_visible != zoom_view_->visible();
1145 } 1145 }
1146 1146
1147 void LocationBarView::RefreshTranslateIcon() { 1147 void LocationBarView::RefreshTranslateIcon() {
1148 if (!TranslateService::IsTranslateBubbleEnabled()) 1148 if (!TranslateService::IsTranslateBubbleEnabled())
1149 return; 1149 return;
1150 1150
1151 WebContents* web_contents = GetWebContents(); 1151 WebContents* web_contents = GetWebContents();
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 1662
1663 void LocationBarView::ModelChanged(const SearchModel::State& old_state, 1663 void LocationBarView::ModelChanged(const SearchModel::State& old_state,
1664 const SearchModel::State& new_state) { 1664 const SearchModel::State& new_state) {
1665 const bool visible = !GetToolbarModel()->input_in_progress() && 1665 const bool visible = !GetToolbarModel()->input_in_progress() &&
1666 new_state.voice_search_supported; 1666 new_state.voice_search_supported;
1667 if (mic_search_view_->visible() != visible) { 1667 if (mic_search_view_->visible() != visible) {
1668 mic_search_view_->SetVisible(visible); 1668 mic_search_view_->SetVisible(visible);
1669 Layout(); 1669 Layout();
1670 } 1670 }
1671 } 1671 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698