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

Side by Side Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 11231077: Move a bunch more code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
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 "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/renderer_host/render_widget_host_view_android.h" 9 #include "content/browser/renderer_host/render_widget_host_view_android.h"
10 #include "content/browser/renderer_host/render_view_host_factory.h" 10 #include "content/browser/renderer_host/render_view_host_factory.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 gfx::Rect WebContentsViewAndroid::GetViewBounds() const { 147 gfx::Rect WebContentsViewAndroid::GetViewBounds() const {
148 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 148 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
149 if (rwhv) 149 if (rwhv)
150 return rwhv->GetViewBounds(); 150 return rwhv->GetViewBounds();
151 else 151 else
152 return gfx::Rect(); 152 return gfx::Rect();
153 } 153 }
154 154
155 void WebContentsViewAndroid::ShowContextMenu( 155 void WebContentsViewAndroid::ShowContextMenu(
156 const ContextMenuParams& params, 156 const ContextMenuParams& params,
157 content::ContextMenuSourceType type) { 157 ContextMenuSourceType type) {
158 if (delegate_.get()) 158 if (delegate_.get())
159 delegate_->ShowContextMenu(params, type); 159 delegate_->ShowContextMenu(params, type);
160 } 160 }
161 161
162 void WebContentsViewAndroid::ShowPopupMenu( 162 void WebContentsViewAndroid::ShowPopupMenu(
163 const gfx::Rect& bounds, 163 const gfx::Rect& bounds,
164 int item_height, 164 int item_height,
165 double item_font_size, 165 double item_font_size,
166 int selected_item, 166 int selected_item,
167 const std::vector<WebMenuItem>& items, 167 const std::vector<WebMenuItem>& items,
(...skipping 25 matching lines...) Expand all
193 // This is called when we the renderer asks us to take focus back (i.e., it has 193 // This is called when we the renderer asks us to take focus back (i.e., it has
194 // iterated past the last focusable element on the page). 194 // iterated past the last focusable element on the page).
195 void WebContentsViewAndroid::TakeFocus(bool reverse) { 195 void WebContentsViewAndroid::TakeFocus(bool reverse) {
196 if (web_contents_->GetDelegate() && 196 if (web_contents_->GetDelegate() &&
197 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 197 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
198 return; 198 return;
199 web_contents_->GetRenderWidgetHostView()->Focus(); 199 web_contents_->GetRenderWidgetHostView()->Focus();
200 } 200 }
201 201
202 } // namespace content 202 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698