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

Issue 10915085: Functions for accessing app window properties, and modifying AppWindow-specifics (Closed)

Created:
8 years, 3 months ago by tapted
Modified:
8 years, 3 months ago
CC:
jeremya+watch_chromium.org, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Functions for accessing app window properties, and modifying AppWindow-specifics such as min/max size. was: chrome.appWindow.{update|getProperties|getAll}() now: chrome.app.window.AppWindow.get{Id,Position,Size,...}() First cut is an API flavour with some encapsulation of 2D (x,y) values but otherwise leaving properties "unbagged" BUG=134068 closed: split into https://chromiumcodereview.appspot.com/10910304/, and a later CL that will diverge a lot from this

Patch Set 1 #

Patch Set 2 : Revision that addresses http://crbug.com/148814 and provides direct access to windowKey, width/heig… #

Patch Set 3 : Call it GetCurrentRoutingID #

Patch Set 4 : Big cleanups - remove width/height from cache #

Patch Set 5 : stray event, js linter #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -8 lines) Patch
M chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc View 1 2 3 2 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/app_current_window_internal.idl View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/app_window.idl View 1 2 3 4 4 chunks +48 lines, -0 lines 4 comments Download
M chrome/renderer/extensions/app_window_custom_bindings.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/extensions/app_window_custom_bindings.cc View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/app_window_custom_bindings.js View 1 2 3 4 2 chunks +126 lines, -8 lines 4 comments Download

Messages

Total messages: 3 (0 generated)
tapted
Sill a WIP (and still lots of chrome internals for me to absorb!). This also ...
8 years, 3 months ago (2012-09-13 09:06:09 UTC) #1
Mihai Parparita -not on Chrome
I think this is headed in the right direction. I would suggest doing just one ...
8 years, 3 months ago (2012-09-16 05:31:39 UTC) #2
tapted
8 years, 3 months ago (2012-09-17 08:48:56 UTC) #3
I've created http://codereview.chromium.org/10910304 to address the cache
changes (for http://crbug.com/148814 )

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/common/exten...
File chrome/common/extensions/api/app_window.idl (right):

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/common/exten...
chrome/common/extensions/api/app_window.idl:62: // The identity of this window
used on creation for persisting state
On 2012/09/16 05:31:39, Mihai Parparita wrote:
> Nit: this was called "id" in the create params, so it should have the same
name
> here.

sticking with `id` in crrev.com/10910304/

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/common/exten...
chrome/common/extensions/api/app_window.idl:84: DOMString windowState;
On 2012/09/16 05:31:39, Mihai Parparita wrote:
> Why not use the WindowState enum here?

will do

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/renderer/res...
File chrome/renderer/resources/extensions/app_window_custom_bindings.js (right):

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/renderer/res...
chrome/renderer/resources/extensions/app_window_custom_bindings.js:108: //
NOTE(tapted) this version should solve crbug.com/148814
On 2012/09/16 05:31:39, Mihai Parparita wrote:
> Can you break out the fix for this bug into a separate CL (possibly to be
landed
> first). I'm finding the cache changes that span multiple JS context hard to
> follow, and it might be easier if they were untangled from the property ones.

Good call -- I've created http://codereview.chromium.org/10910304

https://chromiumcodereview.appspot.com/10915085/diff/1007/chrome/renderer/res...
chrome/renderer/resources/extensions/app_window_custom_bindings.js:148: var
appWindow = chrome.app.window.current();
On 2012/09/16 05:31:39, Mihai Parparita wrote:
> Do you need to look up the current window? It seems like using newWindow in
the
> closure would get you the right window that is being resized.

current() had some logic to deal with developer-reloads breaking the cache, but
that can probably be deferred.

Powered by Google App Engine
This is Rietveld 408576698