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

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: 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
oshima 2011/09/21 04:21:49 can you move #end here so that aura can get defaul
992 RenderWidgetHostView::GetDefaultScreenInfo(results);
993
sadrul 2011/09/21 04:06:11 -newline
991 #endif 994 #endif
992 } 995 }
993 996
994 gfx::Rect RenderWidgetHostViewViews::GetRootWindowBounds() { 997 gfx::Rect RenderWidgetHostViewViews::GetRootWindowBounds() {
995 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL; 998 views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
996 return widget ? widget->GetWindowScreenBounds() : gfx::Rect(); 999 return widget ? widget->GetWindowScreenBounds() : gfx::Rect();
997 } 1000 }
998 #endif 1001 #endif
999 1002
1000 #if !defined(TOUCH_UI) && !defined(OS_WIN) 1003 #if !defined(TOUCH_UI) && !defined(OS_WIN)
1001 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() { 1004 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() {
1002 // TODO(oshima): The original implementation was broken as 1005 // TODO(oshima): The original implementation was broken as
1003 // GtkNativeViewManager doesn't know about NativeWidgetGtk. Figure 1006 // GtkNativeViewManager doesn't know about NativeWidgetGtk. Figure
1004 // out if this makes sense without compositor. If it does, then find 1007 // out if this makes sense without compositor. If it does, then find
1005 // out the right way to handle. 1008 // out the right way to handle.
1006 NOTIMPLEMENTED(); 1009 NOTIMPLEMENTED();
1007 return gfx::kNullPluginWindow; 1010 return gfx::kNullPluginWindow;
1008 } 1011 }
1009 #endif 1012 #endif
1010 1013
1011 #if defined(USE_AURA) 1014 #if defined(USE_AURA)
1012 // static 1015 // static
1013 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 1016 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
1014 RenderWidgetHost* widget) { 1017 RenderWidgetHost* widget) {
1015 return new RenderWidgetHostViewViews(widget); 1018 return new RenderWidgetHostViewViews(widget);
1016 } 1019 }
1017 #endif 1020 #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