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

Side by Side Diff: chrome/browser/ui/gtk/extensions/native_app_window_gtk.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: 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 unified diff | Download patch
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 "chrome/browser/ui/gtk/extensions/native_app_window_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/native_app_window_gtk.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" 9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 int left_inset = current_x - rect_with_decorations.x; 287 int left_inset = current_x - rect_with_decorations.x;
288 int top_inset = current_y - rect_with_decorations.y; 288 int top_inset = current_y - rect_with_decorations.y;
289 return gfx::Insets( 289 return gfx::Insets(
290 top_inset, 290 top_inset,
291 left_inset, 291 left_inset,
292 rect_with_decorations.height - current_height - top_inset, 292 rect_with_decorations.height - current_height - top_inset,
293 rect_with_decorations.width - current_width - left_inset); 293 rect_with_decorations.width - current_width - left_inset);
294 } 294 }
295 295
296 gfx::Rect NativeAppWindowGtk::GetWindowWorkArea() const {
297 NOTIMPLEMENTED();
298 return gfx::Rect();
299 }
300
296 gfx::NativeView NativeAppWindowGtk::GetHostView() const { 301 gfx::NativeView NativeAppWindowGtk::GetHostView() const {
297 NOTIMPLEMENTED(); 302 NOTIMPLEMENTED();
298 return NULL; 303 return NULL;
299 } 304 }
300 305
301 gfx::Point NativeAppWindowGtk::GetDialogPosition(const gfx::Size& size) { 306 gfx::Point NativeAppWindowGtk::GetDialogPosition(const gfx::Size& size) {
302 gint current_width = 0; 307 gint current_width = 0;
303 gint current_height = 0; 308 gint current_height = 0;
304 gtk_window_get_size(window_, &current_width, &current_height); 309 gtk_window_get_size(window_, &current_width, &current_height);
305 return gfx::Point(current_width / 2 - size.width() / 2, 310 return gfx::Point(current_width / 2 - size.width() / 2,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 534
530 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); 535 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
531 } 536 }
532 537
533 // static 538 // static
534 NativeAppWindow* NativeAppWindow::Create( 539 NativeAppWindow* NativeAppWindow::Create(
535 ShellWindow* shell_window, 540 ShellWindow* shell_window,
536 const ShellWindow::CreateParams& params) { 541 const ShellWindow::CreateParams& params) {
537 return new NativeAppWindowGtk(shell_window, params); 542 return new NativeAppWindowGtk(shell_window, params);
538 } 543 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698