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 "content/browser/web_contents/web_contents_view_android.h" | 5 #include "content/browser/web_contents/web_contents_view_android.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/android/content_view_core_impl.h" | 8 #include "content/browser/android/content_view_core_impl.h" |
9 #include "content/browser/frame_host/interstitial_page_impl.h" | 9 #include "content/browser/frame_host/interstitial_page_impl.h" |
10 #include "content/browser/media/android/browser_media_player_manager.h" | 10 #include "content/browser/media/android/browser_media_player_manager.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void WebContentsViewAndroid::ShowPopupMenu( | 176 void WebContentsViewAndroid::ShowPopupMenu( |
177 const gfx::Rect& bounds, | 177 const gfx::Rect& bounds, |
178 int item_height, | 178 int item_height, |
179 double item_font_size, | 179 double item_font_size, |
180 int selected_item, | 180 int selected_item, |
181 const std::vector<MenuItem>& items, | 181 const std::vector<MenuItem>& items, |
182 bool right_aligned, | 182 bool right_aligned, |
183 bool allow_multiple_selection) { | 183 bool allow_multiple_selection) { |
184 if (content_view_core_) { | 184 if (content_view_core_) { |
185 content_view_core_->ShowSelectPopupMenu( | 185 content_view_core_->ShowSelectPopupMenu( |
186 items, selected_item, allow_multiple_selection); | 186 bounds, items, selected_item, allow_multiple_selection); |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 void WebContentsViewAndroid::HidePopupMenu() { | 190 void WebContentsViewAndroid::HidePopupMenu() { |
191 if (content_view_core_) | 191 if (content_view_core_) |
192 content_view_core_->HideSelectPopupMenu(); | 192 content_view_core_->HideSelectPopupMenu(); |
193 } | 193 } |
194 | 194 |
195 void WebContentsViewAndroid::StartDragging( | 195 void WebContentsViewAndroid::StartDragging( |
196 const DropData& drop_data, | 196 const DropData& drop_data, |
(...skipping 16 matching lines...) Expand all Loading... |
213 // This is called when we the renderer asks us to take focus back (i.e., it has | 213 // This is called when we the renderer asks us to take focus back (i.e., it has |
214 // iterated past the last focusable element on the page). | 214 // iterated past the last focusable element on the page). |
215 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 215 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
216 if (web_contents_->GetDelegate() && | 216 if (web_contents_->GetDelegate() && |
217 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 217 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
218 return; | 218 return; |
219 web_contents_->GetRenderWidgetHostView()->Focus(); | 219 web_contents_->GetRenderWidgetHostView()->Focus(); |
220 } | 220 } |
221 | 221 |
222 } // namespace content | 222 } // namespace content |
OLD | NEW |