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

Unified Diff: chrome/browser/tab_contents/tab_contents_view.cc

Issue 3055009: Use RenderWidget(Host) for full screen (Closed)
Patch Set: Add IPC::SyncMessage dependency. Fix auto complete. Created 10 years, 4 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view.cc
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc
index 7ce6ed0e5f7082bf74904da496246c5cba45e35d..c08d1b7cc47318e2a961f6d7dba6193f22e02ee7 100644
--- a/chrome/browser/tab_contents/tab_contents_view.cc
+++ b/chrome/browser/tab_contents/tab_contents_view.cc
@@ -48,6 +48,11 @@ void TabContentsView::CreateNewWidget(int route_id,
CreateNewWidgetInternal(route_id, popup_type);
}
+void TabContentsView::CreateNewFullscreenWidget(
+ int route_id, WebKit::WebPopupType popup_type) {
+ CreateNewFullscreenWidgetInternal(route_id, popup_type);
+}
+
void TabContentsView::ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
@@ -74,6 +79,12 @@ void TabContentsView::Deactivate() {
tab_contents_->delegate()->Deactivate();
}
+void TabContentsView::ShowCreatedFullscreenWidget(int route_id) {
+ RenderWidgetHostView* widget_host_view =
+ delegate_view_helper_.GetCreatedWidget(route_id);
+ ShowCreatedFullscreenWidgetInternal(widget_host_view);
+}
+
bool TabContentsView::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
return tab_contents_->delegate() &&
@@ -97,6 +108,12 @@ RenderWidgetHostView* TabContentsView::CreateNewWidgetInternal(
tab_contents()->render_view_host()->process());
}
+RenderWidgetHostView* TabContentsView::CreateNewFullscreenWidgetInternal(
+ int route_id, WebKit::WebPopupType popup_type) {
+ return delegate_view_helper_.CreateNewFullscreenWidget(
+ route_id, popup_type, tab_contents()->render_view_host()->process());
+}
+
void TabContentsView::ShowCreatedWidgetInternal(
RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) {
if (tab_contents_->delegate())
@@ -106,3 +123,12 @@ void TabContentsView::ShowCreatedWidgetInternal(
initial_pos);
widget_host_view->GetRenderWidgetHost()->Init();
}
+
+void TabContentsView::ShowCreatedFullscreenWidgetInternal(
+ RenderWidgetHostView* widget_host_view) {
+ if (tab_contents_->delegate())
+ tab_contents_->delegate()->RenderWidgetShowing();
+
+ widget_host_view->InitAsFullscreen(tab_contents_->GetRenderWidgetHostView());
+ widget_host_view->GetRenderWidgetHost()->Init();
+}
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698