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

Side by Side Diff: chrome/browser/ui/views/ime/ime_warning_bubble_view.cc

Issue 1971463002: Get rid of some lingering MD-specific raster assets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ime/ime_warning_bubble_view.h" 5 #include "chrome/browser/ui/views/ime/ime_warning_bubble_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h" 10 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 void ImeWarningBubbleView::InitAnchorView() { 133 void ImeWarningBubbleView::InitAnchorView() {
134 views::View* reference_view = nullptr; 134 views::View* reference_view = nullptr;
135 135
136 anchor_to_browser_action_ = 136 anchor_to_browser_action_ =
137 extensions::ActionInfo::GetBrowserActionInfo(extension_) || 137 extensions::ActionInfo::GetBrowserActionInfo(extension_) ||
138 extensions::FeatureSwitch::extension_action_redesign()->IsEnabled(); 138 extensions::FeatureSwitch::extension_action_redesign()->IsEnabled();
139 if (anchor_to_browser_action_) { 139 if (anchor_to_browser_action_) {
140 // Anchors the bubble to the browser action of the extension. 140 // Anchors the bubble to the browser action of the extension.
141 reference_view = container_->GetViewForId(extension_->id()); 141 reference_view = container_->GetViewForId(extension_->id());
142 // If the view is not visible then it is in the chevron, so point the IME
143 // warning bubble to the chevron instead. If this is an incognito window,
144 // both could be invisible.
145 if (!reference_view || !reference_view->visible())
146 reference_view = container_->chevron();
147 } 142 }
148 if (!reference_view || !reference_view->visible()) { 143 if (!reference_view || !reference_view->visible()) {
149 // Anchors the bubble to the app menu. 144 // Anchors the bubble to the app menu.
150 reference_view = browser_view_->GetToolbarView()->app_menu_button(); 145 reference_view = browser_view_->GetToolbarView()->app_menu_button();
151 } 146 }
152 SetAnchorView(reference_view); 147 SetAnchorView(reference_view);
153 set_arrow(views::BubbleBorder::TOP_RIGHT); 148 set_arrow(views::BubbleBorder::TOP_RIGHT);
154 } 149 }
155 150
156 void ImeWarningBubbleView::InitLayout() { 151 void ImeWarningBubbleView::InitLayout() {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 layout->StartRow(0, cs_id); 186 layout->StartRow(0, cs_id);
192 never_show_checkbox_ = 187 never_show_checkbox_ =
193 new views::Checkbox(l10n_util::GetStringUTF16(IDS_IME_API_NEVER_SHOW)); 188 new views::Checkbox(l10n_util::GetStringUTF16(IDS_IME_API_NEVER_SHOW));
194 layout->AddView(never_show_checkbox_); 189 layout->AddView(never_show_checkbox_);
195 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 190 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
196 } 191 }
197 192
198 bool ImeWarningBubbleView::IsToolbarAnimating() { 193 bool ImeWarningBubbleView::IsToolbarAnimating() {
199 return anchor_to_browser_action_ && container_->animating(); 194 return anchor_to_browser_action_ && container_->animating();
200 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc ('k') | chrome/browser/ui/views/toolbar/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698