Commit graph

242 commits

Author SHA1 Message Date
Cheng Zhao
84e2c35611 Use mate::Dictionary instead of base::DictionaryValue for options.
mate::Dictionary can represent arbitray type, which matches our use.
2014-06-23 21:56:22 +08:00
Cheng Zhao
70d3365414 gtk: Add BrowserWindow.setSkipTaskbar API. 2014-06-16 10:29:51 +08:00
Cheng Zhao
a8cb839734 webContents.executeJavaScript should run code after page is loaded.
Fixes atom/atom#1805.
2014-06-16 09:10:41 +08:00
Cheng Zhao
5270eab512 Do not assume trailing callback in dialog API, fixes #395. 2014-06-15 12:43:28 +08:00
Cheng Zhao
7d38fe61d2 "did-finish-load" should only emit for main frame, fixes #385. 2014-06-09 12:03:19 +08:00
Cheng Zhao
da31588e0d mac: Implement the "click" event of TrayIcon. 2014-06-02 11:28:23 +08:00
Cheng Zhao
cbd9366898 Add "click" event for TrayIcon. 2014-06-02 11:08:29 +08:00
Cheng Zhao
9699dbb71f gtk: Add app indicator support as tray icon. 2014-06-01 10:20:06 +08:00
Cheng Zhao
6c7fe80ec5 Bind TrayIcon to JS. 2014-05-30 23:57:54 +08:00
Cheng Zhao
a7b730654c mac: Add APIs on setting icon in titlebar. 2014-05-27 14:15:34 +08:00
Cheng Zhao
2f5dfb1dc7 Do not init Menu lazily, otherwise empty menus would be invalid. 2014-05-27 09:10:54 +08:00
Cheng Zhao
541b855512 Move the ability of calling _init to native_mate. 2014-05-27 08:47:53 +08:00
Cheng Zhao
9b8edeb609 Fix specs. 2014-05-26 13:01:26 +08:00
Cheng Zhao
15d9b320db 💄 Organize Menu and MenuItem's code. 2014-05-26 12:40:21 +08:00
Cheng Zhao
d38ffea4a3 win: Setting enabled/visiable should also update menu. 2014-05-26 12:00:20 +08:00
Cheng Zhao
dfa1ae1c20 win: Update states when setting checked property. 2014-05-26 11:34:36 +08:00
Cheng Zhao
6ee437e9bf win: Force menuWillShow to be called when setting window menu. 2014-05-26 09:38:04 +08:00
Cheng Zhao
22927c9478 Fix error when showing empty menu. 2014-05-25 16:37:45 +08:00
Cheng Zhao
cd35430d0e mac: Make sure menuWillShow is called when setting application menu. 2014-05-25 15:42:23 +08:00
Cheng Zhao
6a48568911 Radio menu items should have at least one item checked.
This is to force all platforms to match the same behavior in GTK+.
2014-05-25 15:25:36 +08:00
Cheng Zhao
aa17b3adc2 Setting a radio menu item should flip other items in the group. 2014-05-25 12:47:38 +08:00
Cheng Zhao
04fbec5120 Generate menu group id automatically.
In GTK+ radio menu items are managed automatically, so group id won't
have any effect there, in the meanwhile we need to maintain the same
behavior on all platforms, so we have to generate group id instead of
letting users specifying it.
2014-05-25 12:37:00 +08:00
Cheng Zhao
fd99d21c8f Make menu's checked property flipped automatically, fixes #349. 2014-05-25 11:32:29 +08:00
Cheng Zhao
fc1bc78fb9 Merge pull request #343 from gmr/master
Add a `focus` event to BrowserWindow
2014-05-23 22:49:59 +08:00
Cheng Zhao
d49060d659 Add "id" property for BrowserWindow, fixes #218. 2014-05-22 09:51:58 +08:00
Gavin M. Roy
b08ec402d2 Add a focus event to BrowserWindow
- Tested in OSX
- Untested in GTK, but I expect it should work
- Did not see any similar constructs for notifications in Windows
2014-05-21 13:46:13 -04:00
Cheng Zhao
972bb2e9fb Make sure webContents is created when opening devtools.
Fixes atom/atom#2270.
2014-05-20 20:58:11 +08:00
Cheng Zhao
5150fd6946 Add BrowserWindow::setContentSize. 2014-05-15 16:06:12 +08:00
Cheng Zhao
76cc3eeb6d Get BrowserWindow::getContentSize API. 2014-05-15 15:30:04 +08:00
Pascal Borreli
831c7f5924 Fixed typos 2014-05-07 07:34:53 +01:00
Cheng Zhao
a69c312389 Fixes auto updater regression, closes atom/atom#1949. 2014-05-07 11:32:06 +08:00
Cheng Zhao
a67c54869f Make sure the job factory is created when initializing protocol module.
Fixes atom/atom#1963, the regression came when moving to use native-mate
to reimplment the APIs.
2014-05-07 09:17:46 +08:00
Cheng Zhao
f176b2c58f Switch to use MIT license. 2014-05-04 20:29:08 +08:00
Cheng Zhao
a85db2d780 Deprecate the BrowserWindow.restart.
Now BrowserWindow.reload would just do the same thing.
2014-04-29 15:44:41 +08:00
Cheng Zhao
19698fc739 Move "restart()" API to webContents. 2014-04-29 15:22:06 +08:00
Cheng Zhao
dc9778f0f2 Fix compilation error on Windows. 2014-04-29 11:39:31 +08:00
Cheng Zhao
1bba15cb7f Avoid using processId and routingId directly. 2014-04-25 16:45:14 +08:00
Cheng Zhao
23ccad4915 Separate the webContents code in a new file. 2014-04-25 16:23:40 +08:00
Cheng Zhao
c0875864dc Handle IPC messages in webContents instead of BrowserWindow. 2014-04-25 16:13:16 +08:00
Cheng Zhao
1815f8b40d Make send and loadUrl also supported methods of BrowserWindow. 2014-04-25 13:14:11 +08:00
Cheng Zhao
272effd470 Add send for webContents. 2014-04-25 13:10:16 +08:00
Cheng Zhao
c8a82e6e50 Move navigator related APIs to webContents. 2014-04-25 12:52:30 +08:00
Cheng Zhao
e70d195cde Fix releasing the wrong renderer view. 2014-04-25 12:40:04 +08:00
Cheng Zhao
4135040449 Move loading events to webContents. 2014-04-25 12:22:16 +08:00
Cheng Zhao
744895f9d8 Add destroyed event for webContents. 2014-04-25 11:59:33 +08:00
Cheng Zhao
859606e88c Move webContents events away from window. 2014-04-25 11:51:05 +08:00
Cheng Zhao
9eeec9aa0b Be safe on lifetime of webContents. 2014-04-25 11:22:51 +08:00
Cheng Zhao
b02bcc0016 Get webContents on request. 2014-04-25 10:57:45 +08:00
Cheng Zhao
c5f8fbf471 Add getter for devToolsWebContents. 2014-04-25 10:48:11 +08:00
Cheng Zhao
00ed814962 Add executeJavaScript method for webContents. 2014-04-25 10:34:40 +08:00
Cheng Zhao
79babe858d Move some APIs from Window to WebContents. 2014-04-24 17:00:41 +08:00
Cheng Zhao
26e93e8798 Initial empty api_web_contents. 2014-04-24 16:45:25 +08:00
Cheng Zhao
d3cda97d50 Enable passing null to dialog API. 2014-04-24 13:10:04 +08:00
Cheng Zhao
822bc2fd52 Only call getDevTools for windows that have devtools. 2014-04-24 12:04:23 +08:00
Cheng Zhao
e8bf798b52 Fix using an null dictionary. 2014-04-24 11:25:06 +08:00
Cheng Zhao
0c9aea3308 Fix compilation under Linux. 2014-04-23 12:45:48 +08:00
Cheng Zhao
babfbe40d2 Fix the capturePage method. 2014-04-23 11:39:40 +08:00
Cheng Zhao
0eb982a972 Make sure window object is destryed. 2014-04-23 10:53:07 +08:00
Cheng Zhao
8417f158b4 Do not free memory used by native window immediately.
Otherwise we would have two ways to destroy a window, making code much
more complicated.
2014-04-23 09:53:38 +08:00
Cheng Zhao
db39910455 Remove window from observers when it's closed instead of deleted. 2014-04-23 09:25:04 +08:00
Cheng Zhao
bccbc5e821 Fix parameter detection in capturePage. 2014-04-23 09:09:28 +08:00
Cheng Zhao
5037daadfb Use closed event instead of destroyed event.
We now do not delete window manually so the destroyed would be delayed
until the object is GCed.
2014-04-23 08:50:33 +08:00
Cheng Zhao
5a316c0c41 Free memory when native window is closed. 2014-04-23 08:50:26 +08:00
Cheng Zhao
a040a96652 Discard all our custom V8 helpers, use native-mate instead. 2014-04-22 23:07:21 +08:00
Cheng Zhao
ef5342b86e Simplify atom_browser_bindings. 2014-04-22 11:06:13 +08:00
Cheng Zhao
7e1c86a105 Remove use of native_type_conversions.h when possible. 2014-04-21 23:49:53 +08:00
Cheng Zhao
2efed6f910 Simplify menu api. 2014-04-21 23:40:10 +08:00
Cheng Zhao
a13c29f0e6 Simplify protocol api. 2014-04-21 16:33:32 +08:00
Cheng Zhao
dd6caba082 Fix cpplint warning. 2014-04-18 17:28:05 +08:00
Cheng Zhao
e5176d6a0a Use BrowserV8Locker when possible. 2014-04-18 17:25:22 +08:00
Cheng Zhao
1dd57bd3a4 Use the new function converter in dialog api. 2014-04-18 17:19:15 +08:00
Cheng Zhao
8f2b998718 Simpilfy auto_updater api. 2014-04-17 17:26:21 +08:00
Cheng Zhao
f36569c3b9 Use native_mate based Event in browser_ipc. 2014-04-17 17:14:05 +08:00
Cheng Zhao
da483ba7f3 Simplify app api. 2014-04-17 17:13:46 +08:00
Cheng Zhao
7c50393c72 Simplify power_monitor api. 2014-04-17 17:13:17 +08:00
Cheng Zhao
7106a36ccb Add native_mate implemented Event and EventEmitter. 2014-04-17 17:12:27 +08:00
Cheng Zhao
77cccc2db6 Simplify browser_ipc api. 2014-04-17 13:51:59 +08:00
Cheng Zhao
5dae7b8658 Put converters under atom/common/native_mate_converters. 2014-04-17 13:45:14 +08:00
Cheng Zhao
aa1efe70e2 Use native_mate to simplify dialog api. 2014-04-16 15:14:44 +08:00
Cheng Zhao
e576d4c014 Fix app.exit compatibility. 2014-04-10 17:08:22 +08:00
Cheng Zhao
538bd1116d Deprecate app.terminate API.
Users should use app.quit which can shutdown the application gracefuly.
2014-04-10 15:08:14 +08:00
Cheng Zhao
d7a54cf3a6 Add API to execute javascript in devtools. 2014-04-08 12:50:12 +08:00
Cheng Zhao
f5fc26d8fc Enable getting a window according to its attached devtools. 2014-04-04 22:28:18 +08:00
Cheng Zhao
a80fe40f56 Synchronous event should be bound to WebContents.
This allows us to reply to synchronous message for arbitrary
WebContents.
2014-04-04 22:04:42 +08:00
Cheng Zhao
d7261073e7 Free window object immediately in destory().
This put everything back to the original design, since now it's not
possible to destory a window while a context menu is showing.
2014-03-26 09:58:40 +08:00
Cheng Zhao
8b41e78245 Fix a possible crash when destroying window.
It could happend that the JS BrowserWindow object being double deleted
when calling the destroy() method.
2014-03-26 09:14:05 +08:00
Cheng Zhao
679959eeb5 BrowserWindow.destroy() should not delete window immediately.
It could cause crash when context menu is showing.
2014-03-25 17:00:03 +08:00
Cheng Zhao
e96a3abdf9 mac: Do not allow nested task when showing menu.
Fixes #163.
2014-03-25 16:56:02 +08:00
Cheng Zhao
2d808d30a2 Bring back build/include_order cpplint. 2014-03-16 09:13:06 +08:00
Cheng Zhao
bbef33a33a Bring back build/header_guard cpplint. 2014-03-16 08:58:59 +08:00
Cheng Zhao
68cb6ee861 Move atom/browser/ui/gtk to chrome/. 2014-03-16 08:39:43 +08:00
Cheng Zhao
516d46444d Move all sources under atom/. 2014-03-16 08:30:26 +08:00