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

Unified Diff: chrome/browser/ui/views/extensions/native_app_window_views.cc

Issue 17378003: [WIN]Save work area of window and adjust bounds to ensure it fit on screen before show. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases. Created 7 years, 6 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/ui/views/extensions/native_app_window_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/native_app_window_views.cc
diff --git a/chrome/browser/ui/views/extensions/native_app_window_views.cc b/chrome/browser/ui/views/extensions/native_app_window_views.cc
index a030010237ab9f69cde219a1caebcfc252f880f8..c17b81967f0bb47293471059893d04d7fecf06bf 100644
--- a/chrome/browser/ui/views/extensions/native_app_window_views.cc
+++ b/chrome/browser/ui/views/extensions/native_app_window_views.cc
@@ -22,6 +22,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "extensions/common/draggable_region.h"
+#include "ui/gfx/screen.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/non_client_view.h"
@@ -406,6 +407,11 @@ gfx::Insets NativeAppWindowViews::GetFrameInsets() const {
return window_bounds.InsetsFrom(client_bounds);
}
+gfx::Rect NativeAppWindowViews::GetScreenBounds() const {
+ return gfx::Screen::GetScreenFor(window_->GetNativeView())->
+ GetDisplayMatching(GetBounds()).work_area();
+}
+
gfx::NativeView NativeAppWindowViews::GetHostView() const {
return window_->GetNativeView();
}
« no previous file with comments | « chrome/browser/ui/views/extensions/native_app_window_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698