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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 7978011: Possible workaround for bug with loading pages in a background tab (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Implementing request to give aura build default info Created 9 years, 3 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
« no previous file with comments | « no previous file | views/widget/native_widget_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 978
979 #if defined(OS_POSIX) 979 #if defined(OS_POSIX)
980 void RenderWidgetHostViewViews::GetDefaultScreenInfo( 980 void RenderWidgetHostViewViews::GetDefaultScreenInfo(
981 WebKit::WebScreenInfo* results) { 981 WebKit::WebScreenInfo* results) {
982 NOTIMPLEMENTED(); 982 NOTIMPLEMENTED();
983 } 983 }
984 984
985 void RenderWidgetHostViewViews::GetScreenInfo(WebKit::WebScreenInfo* results) { 985 void RenderWidgetHostViewViews::GetScreenInfo(WebKit::WebScreenInfo* results) {
986 #if !defined(USE_AURA) 986 #if !defined(USE_AURA)
987 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL; 987 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
988 if (widget) 988 if (widget && widget->GetNativeView())
989 content::GetScreenInfoFromNativeWindow(widget->GetNativeView()->window, 989 content::GetScreenInfoFromNativeWindow(widget->GetNativeView()->window,
990 results); 990 results);
991 else
992 RenderWidgetHostView::GetDefaultScreenInfo(results);
993 #else
994 RenderWidgetHostView::GetDefaultScreenInfo(results);
991 #endif 995 #endif
992 } 996 }
993 997
994 gfx::Rect RenderWidgetHostViewViews::GetRootWindowBounds() { 998 gfx::Rect RenderWidgetHostViewViews::GetRootWindowBounds() {
995 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL; 999 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
996 return widget ? widget->GetWindowScreenBounds() : gfx::Rect(); 1000 return widget ? widget->GetWindowScreenBounds() : gfx::Rect();
997 } 1001 }
998 #endif 1002 #endif
999 1003
1000 #if !defined(TOUCH_UI) && !defined(OS_WIN) 1004 #if !defined(TOUCH_UI) && !defined(OS_WIN)
1001 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() { 1005 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() {
1002 // TODO(oshima): The original implementation was broken as 1006 // TODO(oshima): The original implementation was broken as
1003 // GtkNativeViewManager doesn't know about NativeWidgetGtk. Figure 1007 // GtkNativeViewManager doesn't know about NativeWidgetGtk. Figure
1004 // out if this makes sense without compositor. If it does, then find 1008 // out if this makes sense without compositor. If it does, then find
1005 // out the right way to handle. 1009 // out the right way to handle.
1006 NOTIMPLEMENTED(); 1010 NOTIMPLEMENTED();
1007 return gfx::kNullPluginWindow; 1011 return gfx::kNullPluginWindow;
1008 } 1012 }
1009 #endif 1013 #endif
1010 1014
1011 #if defined(USE_AURA) 1015 #if defined(USE_AURA)
1012 // static 1016 // static
1013 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 1017 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
1014 RenderWidgetHost* widget) { 1018 RenderWidgetHost* widget) {
1015 return new RenderWidgetHostViewViews(widget); 1019 return new RenderWidgetHostViewViews(widget);
1016 } 1020 }
1017 #endif 1021 #endif
OLDNEW
« no previous file with comments | « no previous file | views/widget/native_widget_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698