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

Issue 11369237: Add a way to fetch window frame metrics from NativeShellWindow (Closed)

Created:
8 years, 1 month ago by jeremya
Modified:
8 years ago
Reviewers:
stevenjb, sky, Evan Stade
CC:
chromium-reviews, jennb, tfarina, jeremya+watch_chromium.org, Dmitry Titov, dcheng, Aaron Boodman, jianli, chromium-apps-reviews_chromium.org, benwells, koz (OOO until 15th September), tapted
Visibility:
Public.

Description

Add a way to fetch window frame metrics from NativeShellWindow This adds default implementations to the Cocoa and Gtk shell windows. The views shell window is currently the only class that implements these in a non-default way; the Cocoa and Gtk will get their own implementations in a follow-up patch. This is needed to have the app window setBounds() and getBounds() APIs operate on content bounds rather than window frame bounds. R=ben@chromium.org,rsesek@chromium.org,estade@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170713

Patch Set 1 #

Patch Set 2 : add comments #

Total comments: 2

Patch Set 3 : NOTIMPLEMENTED() #

Total comments: 2

Patch Set 4 : GetFrameInsets #

Total comments: 4

Patch Set 5 : remove default implementation #

Patch Set 6 : move to NativeShellWindow #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : add more #includes #

Patch Set 9 : yet more includes #

Patch Set 10 : change ShellWindowViews frame insets logic #

Total comments: 2

Patch Set 11 : comment #

Patch Set 12 : one more include + rebase #

Patch Set 13 : one more include... #

Patch Set 14 : oops, un-revert #11 #

Patch Set 15 : rebase #

Patch Set 16 : fix rebased patch #

Patch Set 17 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -13 lines) Patch
M chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/app_window/app_window_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/app_window/app_window_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/platform_app_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/platform_app_browsertest_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/shell_window_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/native_app_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/native_app_window_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/native_app_window_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/extensions/native_app_window_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/extensions/native_app_window_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +18 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
jeremya
8 years, 1 month ago (2012-11-14 05:23:43 UTC) #1
Evan Stade
https://codereview.chromium.org/11369237/diff/3001/chrome/browser/ui/gtk/browser_window_gtk.cc File chrome/browser/ui/gtk/browser_window_gtk.cc (right): https://codereview.chromium.org/11369237/diff/3001/chrome/browser/ui/gtk/browser_window_gtk.cc#newcode717 chrome/browser/ui/gtk/browser_window_gtk.cc:717: return window_bounds; please at least add a comment of ...
8 years, 1 month ago (2012-11-14 21:20:59 UTC) #2
jeremya
https://codereview.chromium.org/11369237/diff/3001/chrome/browser/ui/gtk/browser_window_gtk.cc File chrome/browser/ui/gtk/browser_window_gtk.cc (right): https://codereview.chromium.org/11369237/diff/3001/chrome/browser/ui/gtk/browser_window_gtk.cc#newcode717 chrome/browser/ui/gtk/browser_window_gtk.cc:717: return window_bounds; On 2012/11/14 21:20:59, Evan Stade wrote: > ...
8 years, 1 month ago (2012-11-14 23:35:59 UTC) #3
stevenjb
https://codereview.chromium.org/11369237/diff/4001/chrome/browser/ui/base_window.h File chrome/browser/ui/base_window.h (right): https://codereview.chromium.org/11369237/diff/4001/chrome/browser/ui/base_window.h#newcode91 chrome/browser/ui/base_window.h:91: const gfx::Rect& content_bounds) const = 0; I was wondering ...
8 years, 1 month ago (2012-11-14 23:54:09 UTC) #4
jeremya
http://codereview.chromium.org/11369237/diff/4001/chrome/browser/ui/base_window.h File chrome/browser/ui/base_window.h (right): http://codereview.chromium.org/11369237/diff/4001/chrome/browser/ui/base_window.h#newcode91 chrome/browser/ui/base_window.h:91: const gfx::Rect& content_bounds) const = 0; On 2012/11/14 23:54:10, ...
8 years, 1 month ago (2012-11-15 02:21:13 UTC) #5
jeremya
Updated to use GetFrameInsets() and a default implementation.
8 years, 1 month ago (2012-11-15 02:58:29 UTC) #6
stevenjb
https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h File chrome/browser/ui/base_window.h (right): https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h#newcode86 chrome/browser/ui/base_window.h:86: } If we have a default implementation, we need ...
8 years, 1 month ago (2012-11-15 18:22:47 UTC) #7
jeremya
https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h File chrome/browser/ui/base_window.h (right): https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h#newcode86 chrome/browser/ui/base_window.h:86: } On 2012/11/15 18:22:47, stevenjb (chromium) wrote: > If ...
8 years, 1 month ago (2012-11-16 00:12:05 UTC) #8
stevenjb
On 2012/11/16 00:12:05, jeremya wrote: > https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h > File chrome/browser/ui/base_window.h (right): > > https://codereview.chromium.org/11369237/diff/7001/chrome/browser/ui/base_window.h#newcode86 > ...
8 years, 1 month ago (2012-11-16 00:34:58 UTC) #9
jeremya
I removed the default implementation and implemented it in every descendant.
8 years, 1 month ago (2012-11-19 04:33:39 UTC) #10
stevenjb
Thanks. Tedious I know, but better here Hi think. LGTM
8 years, 1 month ago (2012-11-19 17:36:37 UTC) #11
Evan Stade
FWIW, I don't think that it stops being an interface just because you have a ...
8 years, 1 month ago (2012-11-19 19:30:42 UTC) #12
jeremya
Ping sky@ for OWNERS rubber stamp :)
8 years, 1 month ago (2012-11-19 23:35:56 UTC) #13
sky
Is there a reason this needs to be in BaseWindow and not some where closer ...
8 years, 1 month ago (2012-11-20 00:14:55 UTC) #14
jeremya
On 2012/11/20 00:14:55, sky wrote: > Is there a reason this needs to be in ...
8 years, 1 month ago (2012-11-20 04:50:59 UTC) #15
sky
LGTM
8 years, 1 month ago (2012-11-20 16:38:50 UTC) #16
stevenjb
https://codereview.chromium.org/11369237/diff/9003/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc File chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc (right): https://codereview.chromium.org/11369237/diff/9003/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc#newcode7 chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc:7: #include "chrome/browser/ui/extensions/native_shell_window.h" This shouldn't be necessary, should it? https://codereview.chromium.org/11369237/diff/9003/chrome/browser/extensions/shell_window_registry.cc ...
8 years, 1 month ago (2012-11-20 18:34:07 UTC) #17
jeremya
On 2012/11/20 18:34:07, stevenjb (chromium) wrote: > https://codereview.chromium.org/11369237/diff/9003/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc > File > chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc > (right): > ...
8 years, 1 month ago (2012-11-20 22:08:43 UTC) #18
stevenjb
Right, of course, nevermind. Sorry about that. LGTM
8 years, 1 month ago (2012-11-21 00:43:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/9003
8 years, 1 month ago (2012-11-21 00:46:02 UTC) #20
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-21 01:11:45 UTC) #21
jeremya
My previous patch didn't account for ash, where the size of the frame is different ...
8 years, 1 month ago (2012-11-22 00:06:55 UTC) #22
jeremya
(in shell_window_views.cc)
8 years, 1 month ago (2012-11-22 00:07:22 UTC) #23
stevenjb
https://codereview.chromium.org/11369237/diff/22030/chrome/browser/ui/views/extensions/shell_window_views.cc File chrome/browser/ui/views/extensions/shell_window_views.cc (right): https://codereview.chromium.org/11369237/diff/22030/chrome/browser/ui/views/extensions/shell_window_views.cc#newcode580 chrome/browser/ui/views/extensions/shell_window_views.cc:580: gfx::Rect client_bounds = gfx::Rect(100, 100); I take it 100 ...
8 years ago (2012-11-27 01:12:47 UTC) #24
jeremya
https://codereview.chromium.org/11369237/diff/22030/chrome/browser/ui/views/extensions/shell_window_views.cc File chrome/browser/ui/views/extensions/shell_window_views.cc (right): https://codereview.chromium.org/11369237/diff/22030/chrome/browser/ui/views/extensions/shell_window_views.cc#newcode580 chrome/browser/ui/views/extensions/shell_window_views.cc:580: gfx::Rect client_bounds = gfx::Rect(100, 100); On 2012/11/27 01:12:47, stevenjb ...
8 years ago (2012-11-27 02:50:16 UTC) #25
stevenjb
Thanks, LGTM
8 years ago (2012-11-28 00:03:06 UTC) #26
sky
SLGTM
8 years ago (2012-11-28 00:10:23 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/9026
8 years ago (2012-11-28 00:52:06 UTC) #28
commit-bot: I haz the power
Failed to trigger a try job on ios_dbg_simulator HTTP Error 400: Bad Request
8 years ago (2012-11-28 01:23:31 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/15025
8 years ago (2012-11-28 01:23:40 UTC) #30
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-28 01:57:05 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/24014
8 years ago (2012-11-28 02:18:34 UTC) #32
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests
8 years ago (2012-11-28 04:56:31 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/24014
8 years ago (2012-11-28 06:28:31 UTC) #34
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests
8 years ago (2012-11-28 08:41:38 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/16026
8 years ago (2012-11-28 23:57:26 UTC) #36
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-29 00:43:32 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/16026
8 years ago (2012-11-29 00:44:45 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/16026
8 years ago (2012-11-30 04:02:26 UTC) #39
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years ago (2012-11-30 04:02:31 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/22051
8 years ago (2012-11-30 05:46:30 UTC) #41
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-30 06:03:28 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/18031
8 years ago (2012-12-03 03:37:30 UTC) #43
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/extensions/shell_window.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years ago (2012-12-03 03:37:38 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/24020
8 years ago (2012-12-03 04:53:45 UTC) #45
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
8 years ago (2012-12-03 04:55:30 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/11369237/24020
8 years ago (2012-12-03 05:31:05 UTC) #47
commit-bot: I haz the power
8 years ago (2012-12-03 08:33:56 UTC) #48
Message was sent while issue was closed.
Change committed as 170713

Powered by Google App Engine
This is Rietveld 408576698