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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2641403002: [refactor] - Move IsFocusedElementEditable() and ClearFocusedElement() from RenderViewHost to WebCo… (Closed)
Patch Set: Addressed sky@'s comment Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 73ece4834dedcb423448918b5f124b873331e537..9ebe8c7ec010208baa9f6115ed74209546dd03ee 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1211,10 +1211,9 @@ ShowTranslateBubbleResult BrowserView::ShowTranslateBubble(
translate::TranslateErrors::Type error_type,
bool is_user_gesture) {
if (contents_web_view_->HasFocus() &&
- !GetLocationBarView()->IsMouseHovered()) {
- content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
- if (rvh->IsFocusedElementEditable())
- return ShowTranslateBubbleResult::EDITABLE_FIELD_IS_ACTIVE;
+ !GetLocationBarView()->IsMouseHovered() &&
+ web_contents->IsFocusedElementEditable()) {
+ return ShowTranslateBubbleResult::EDITABLE_FIELD_IS_ACTIVE;
}
translate::LanguageState& language_state =
« no previous file with comments | « chrome/browser/ui/views/find_bar_host.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698