diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-03-07 21:34:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 21:34:37 +0900 |
commit | d2a3c6cdd4d6ca564d9a80d281ba14648ffcc6eb (patch) | |
tree | 0de3603c8cffef056584413ef8a5a0dc051b8d8f /src/background/components | |
parent | 72bf3cc2bdcc63864e064a64f7459aba004f4538 (diff) | |
parent | 92f8365be7127c3fa0276b1a6e890571f634622e (diff) |
Merge pull request #355 from ueokande/search-across-pages
Search across pages
Diffstat (limited to 'src/background/components')
-rw-r--r-- | src/background/components/background.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/background/components/background.js b/src/background/components/background.js index c4f436a..fdec8ec 100644 --- a/src/background/components/background.js +++ b/src/background/components/background.js @@ -2,6 +2,7 @@ import messages from 'shared/messages'; import * as operationActions from 'background/actions/operation'; import * as commandActions from 'background/actions/command'; import * as settingActions from 'background/actions/setting'; +import * as findActions from 'background/actions/find'; import * as tabActions from 'background/actions/tab'; import * as commands from 'shared/commands'; @@ -23,6 +24,8 @@ export default class BackgroundComponent { onMessage(message, sender) { let settings = this.store.getState().setting; + let find = this.store.getState().find; + switch (message.type) { case messages.BACKGROUND_OPERATION: return this.store.dispatch( @@ -48,6 +51,11 @@ export default class BackgroundComponent { case messages.SETTINGS_RELOAD: this.store.dispatch(settingActions.load()); return this.broadcastSettingsChanged(); + case messages.FIND_GET_KEYWORD: + return Promise.resolve(find.keyword); + case messages.FIND_SET_KEYWORD: + this.store.dispatch(findActions.setKeyword(message.keyword)); + return Promise.resolve({}); } } |